summaryrefslogtreecommitdiff
path: root/drivers/tty/isicom.c
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2013-11-22 12:16:25 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-04 19:05:40 (GMT)
commitcba44dab11c8119a361d4962dc170b05012fe397 (patch)
tree25b8486c9389d8769dfd5ea5c60e89f550d749c2 /drivers/tty/isicom.c
parent592ea2ae0e375a32d11b11a1d732f68c58f3fd8b (diff)
downloadlinux-fsl-qoriq-cba44dab11c8119a361d4962dc170b05012fe397.tar.xz
n_tty: Fix 4096-byte canonical reads
commit c77569d2f3ef7844ee4ac7005a57da6898b302a8 upstream. 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 32f13521ca68bc624ff6effc77f308a52b038bf0, 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]. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/isicom.c')
0 files changed, 0 insertions, 0 deletions