tty: Flush tty buffers after hardware shutdown
authorPeter Hurley <peter@hurleysoftware.com>
Wed, 5 Nov 2014 17:40:05 +0000 (12:40 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Nov 2014 22:57:27 +0000 (14:57 -0800)
commit3f40f5b2a22110754ce469f5722bade8aeb241e5
tree00959efe05c52314e168be06c9cb5f54cbf7547e
parent413ba6385382bc80e4bf2f58efa900e82e810b11
tty: Flush tty buffers after hardware shutdown

The line discipline buffer and the tty buffers must be flushed again
after hardware shutdown; otherwise, a brief window exists between the
ldisc flush in tty_port_close_start() and the subsequent
tty_port_shutdown(), during which more data could be received into the
tty buffers. A racing open might then be able to receive data from the
previous session.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_port.c