aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/powerpc-hcalls.py
diff options
context:
space:
mode:
authorDaniel Starke <[email protected]>2022-05-04 08:17:33 +0000
committerGreg Kroah-Hartman <[email protected]>2022-05-05 21:00:07 +0000
commit9361ebfbb79fd1bc8594a487c01ad52cdaa391ea (patch)
tree849430a283636e36abaa05a1d21c8afa058079a6 /tools/perf/scripts/python/powerpc-hcalls.py
parenttty: n_gsm: fix mux activation issues in gsm_config() (diff)
downloadkernel-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/powerpc-hcalls.py')
0 files changed, 0 insertions, 0 deletions