n_tty: Ignore all read data when closing
authorPeter Hurley <peter@hurleysoftware.com>
Mon, 11 Jan 2016 04:36:09 +0000 (20:36 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Jan 2016 22:13:44 +0000 (14:13 -0800)
On final port close (and thus final tty close), only output flow
control requests in the input data should be processed. Ignore all
other input data, including parity errors, overruns and breaks.

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

index fad365a..fb76a7d 100644 (file)
@@ -1524,8 +1524,6 @@ n_tty_receive_buf_closing(struct tty_struct *tty, const unsigned char *cp,
                        flag = *fp++;
                if (likely(flag == TTY_NORMAL))
                        n_tty_receive_char_closing(tty, *cp++);
-               else
-                       n_tty_receive_char_flagged(tty, *cp++, flag);
        }
 }