linux/drivers/tty
Peter Hurley c77569d2f3 n_tty: Fix 4096-byte canonical reads
Although the maximum allowable canonical line is specified to
be 255 bytes (MAX_CANON), the practical limit has actually been
the size of the line discipline read buffer (N_TTY_BUF_SIZE == 4096).

Commit 32f13521ca,
n_tty: Line copy to user buffer in canonical mode, limited the
line copy to 4095 bytes. With a completely full line discipline
read buffer and a userspace buffer > 4095, _no_ data was copied,
and the read() syscall returned 0, indicating EOF.

Fix the interval arithmetic to compute the correct number of bytes
to copy to userspace in the range [1..4096].

Cc: <stable@vger.kernel.org> # 3.12.x
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25 08:36:56 -08:00
..
hvc Features: 2013-11-15 13:34:37 +09:00
ipwireless
serial Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-11-20 13:20:24 -08:00
vt vt: properly ignore xterm-256 colour codes 2013-09-26 15:58:27 -07:00
amiserial.c TTY: amiserial, remove unnecessary platform_set_drvdata() 2013-08-27 16:24:33 -07:00
bfin_jtag_comm.c TTY: bfin_jtag_comm: fix incorrect placement of __initdata tag 2013-09-30 19:09:37 -07:00
cyclades.c
ehv_bytechan.c drivers: clean-up prom.h implicit includes 2013-10-09 20:04:04 -05:00
goldfish.c
isicom.c
Kconfig
Makefile tty: Add timed, writer-prioritized rw semaphore 2013-05-20 12:30:32 -07:00
metag_da.c tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
moxa.c
moxa.h
mxser.c tty: mxser: Fix build warning introduced by dfc7b837c7 (Re: linux-next: build warning after merge of the tty.current tree) 2013-05-22 10:26:02 -07:00
mxser.h
n_gsm.c Drivers: tty: n_gsm.c: fixed 7 errors & 6 warnings that checkpatch complained 2013-07-24 15:21:13 -07:00
n_hdlc.c
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c n_tty: Fix 4096-byte canonical reads 2013-11-25 08:36:56 -08:00
nozomi.c tty: Remove unnecessary semicolons 2013-10-16 13:08:16 -07:00
pty.c tty: Fix lock order in tty_do_resize() 2013-07-24 15:12:53 -07:00
rocket_int.h
rocket.c TTY: rocket, fix more no-PCI warnings 2013-05-20 12:15:59 -07:00
rocket.h
synclink_gt.c
synclink.c TTY: synclink: replace bitmasks add operation with OR operation. 2013-07-29 12:47:37 -07:00
synclinkmp.c TTY: snyclinkmp: calculating wrong addresses 2013-07-24 15:23:38 -07:00
sysrq.c sysrq: Allow magic SysRq key functions to be disabled through Kconfig 2013-10-16 13:01:44 -07:00
tty_audit.c audit: do not needlessly take a lock in tty_audit_exit 2013-04-30 15:31:28 -04:00
tty_buffer.c tty: Remove private constant from global namespace 2013-07-23 16:47:10 -07:00
tty_io.c tty: disassociate_ctty() sends the extra SIGCONT 2013-09-17 21:53:32 -04:00
tty_ioctl.c tty: Fix SIGTTOU not sent with tcflush() 2013-09-25 17:52:17 -07:00
tty_ldisc.c tty: Convert termios_mutex to termios_rwsem 2013-07-23 16:43:01 -07:00
tty_ldsem.c tty: Add timed, writer-prioritized rw semaphore 2013-05-20 12:30:32 -07:00
tty_mutex.c
tty_port.c tty: Remove unused drop() method from tty_port interface 2013-09-25 18:08:34 -07:00