alistair23-linux/drivers/tty
Colin Ian King 9ef8927f45 n_tty: check for negative and zero space return from tty_write_room
The return from tty_write_room could potentially be negative if
a tty write_room driver returns an error number (not that any seem
to do). Rather than just check for a zero return, also check for
a -ve return. This avoids the unsigned nr being set to a large unsigned
value on the assignment from variable space and can lead to overflowing
the buffer buf.  Better to be safe than assume all write_room
implementations in tty drivers are going to do the right thing.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 15:21:33 +02:00
..
hvc tty: add SPDX identifiers to Kconfig and Makefiles 2019-04-04 18:48:43 +02:00
ipwireless tty: add SPDX identifiers to Kconfig and Makefiles 2019-04-04 18:48:43 +02:00
serdev tty: add SPDX identifiers to Kconfig and Makefiles 2019-04-04 18:48:43 +02:00
serial tty: fix up a few remaining files without SPDX identifiers 2019-04-04 18:48:43 +02:00
vt tty: fix up a few remaining files without SPDX identifiers 2019-04-04 18:48:43 +02:00
amiserial.c
cyclades.c
ehv_bytechan.c
goldfish.c
isicom.c
Kconfig tty: add SPDX identifiers to Kconfig and Makefiles 2019-04-04 18:48:43 +02:00
Makefile
mips_ejtag_fdc.c
moxa.c
moxa.h
mxser.c
mxser.h
n_gsm.c tty: n_gsm: Mark expected switch fall-throughs 2019-02-26 12:30:44 +01:00
n_hdlc.c tty/n_hdlc: mark expected switch fall-through 2019-02-14 10:49:19 +01:00
n_null.c
n_r3964.c tty: Don't block on IO when ldisc change is pending 2018-12-05 12:16:33 +01:00
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c n_tty: check for negative and zero space return from tty_write_room 2019-04-16 15:21:33 +02:00
nozomi.c tty/nozomi: use pci_iomap instead of ioremap_nocache 2019-02-12 10:26:45 +01:00
pty.c Revert "tty: pty: Fix race condition between release_one_tty and pty_write" 2019-03-29 15:47:40 +01:00
rocket.c
rocket.h
rocket_int.h
synclink.c tty/synclink: remove ISA support 2019-02-12 08:51:33 +01:00
synclink_gt.c
synclinkmp.c
sysrq.c tty/sysrq: Convert show_lock to raw_spinlock_t 2019-03-28 01:24:55 +09:00
tty_audit.c audit: join tty records to their syscall 2019-02-07 21:33:54 -05:00
tty_baudrate.c
tty_buffer.c tty: increase the default flip buffer limit to 2*640K 2019-01-30 12:03:58 +01:00
tty_io.c Revert "tty: pty: Fix race condition between release_one_tty and pty_write" 2019-03-29 15:47:40 +01:00
tty_ioctl.c
tty_jobctrl.c tty: fix read of tty->pgrp outside of ctrl_lock 2019-03-28 01:28:23 +09:00
tty_ldisc.c tty: ldisc: add sysctl to prevent autoloading of ldiscs 2019-01-30 09:31:30 +01:00
tty_ldsem.c tty/ldsem: Decrement wait_readers on timeouted down_read() 2018-12-05 12:16:33 +01:00
tty_mutex.c
tty_port.c tty: fix NULL pointer issue when tty_port ops is not set 2019-03-28 01:21:21 +09:00
vcc.c tty: fix up a few remaining files without SPDX identifiers 2019-04-04 18:48:43 +02:00