summaryrefslogtreecommitdiffstats
path: root/drivers/tty/pty.c
diff options
context:
space:
mode:
authorJaeden Amero <jaeden.amero@ni.com>2012-07-27 08:43:11 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-10 13:14:54 -0700
commit090abf7b91645c1936ba959b1e1cd6d09110779c (patch)
tree49045c02ba80b131e604a3e13ec4081c9cd62832 /drivers/tty/pty.c
parent00aaae033e323af33740e7012a8ba4b0fa6dce20 (diff)
downloadop-kernel-dev-090abf7b91645c1936ba959b1e1cd6d09110779c.zip
op-kernel-dev-090abf7b91645c1936ba959b1e1cd6d09110779c.tar.gz
n_tty: Don't lose characters when PARMRK is enabled
When PARMRK is set and large transfers of characters that will get marked are being received, n_tty could drop data silently (i.e. without reporting any error to the client). This is because characters have the potential to take up to three bytes in the line discipline (when they get marked with parity or framing errors), but the amount of free space reported to tty_buffer flush_to_ldisc (via tty->receive_room) is based on the pre-marked data size. With this patch, the n_tty layer will no longer assume that each byte will only take up one byte in the line discipline. Instead, it will make an overly conservative estimate that each byte will take up three bytes in the line discipline when PARMRK is set. Signed-off-by: Jaeden Amero <jaeden.amero@ni.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/pty.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud