]> git.hungrycats.org Git - linux/commit
n_tty: Fix stale echo output
authorPeter Hurley <peter@hurleysoftware.com>
Tue, 11 Feb 2014 21:34:55 +0000 (16:34 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Feb 2014 21:34:47 +0000 (13:34 -0800)
commitc3c3649417e46c9520289f7f03f689642cc66c03
tree44ea48c831a2178eee1e597802443932b764f5b3
parenta0b07ab1aacc19bc7e08d2bea3339171514af711
n_tty: Fix stale echo output

commit e2613be5093d04e6589924d36a1e363eef3c87c7 upstream.

When echoes cannot be flushed to output (usually because the tty
has no more write room) and L_ECHO is subsequently turned off, then
when L_ECHO is turned back on, stale echoes are output.

Output completed echoes regardless of the L_ECHO setting:
  1. before normal writes to that tty
  2. if the tty was stopped by soft flow control and is being
     restarted

Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_tty.c