diff options
| author | Daniel Starke <[email protected]> | 2022-05-04 08:17:33 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2022-05-05 21:00:07 +0000 |
| commit | 9361ebfbb79fd1bc8594a487c01ad52cdaa391ea (patch) | |
| tree | 849430a283636e36abaa05a1d21c8afa058079a6 /tools/perf/scripts/python/failed-syscalls-by-pid.py | |
| parent | tty: n_gsm: fix mux activation issues in gsm_config() (diff) | |
| download | kernel-9361ebfbb79fd1bc8594a487c01ad52cdaa391ea.tar.gz kernel-9361ebfbb79fd1bc8594a487c01ad52cdaa391ea.zip | |
tty: n_gsm: fix invalid gsmtty_write_room() result
gsmtty_write() does not prevent the user to use the full fifo size of 4096
bytes as allocated in gsm_dlci_alloc(). However, gsmtty_write_room() tries
to limit the return value by 'TX_SIZE' and returns a negative value if the
fifo has more than 'TX_SIZE' bytes stored. This is obviously wrong as
'TX_SIZE' is defined as 512.
Define 'TX_SIZE' to the fifo size and use it accordingly for allocation to
keep the current behavior. Return the correct remaining size of the fifo in
gsmtty_write_room() via kfifo_avail().
Fixes: e1eaea46bb40 ("tty: n_gsm line discipline")
Cc: [email protected]
Signed-off-by: Daniel Starke <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/failed-syscalls-by-pid.py')
0 files changed, 0 insertions, 0 deletions
