From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758601AbcAKEiy (ORCPT ); Sun, 10 Jan 2016 23:38:54 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:33869 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758372AbcAKEg3 (ORCPT ); Sun, 10 Jan 2016 23:36:29 -0500 From: Peter Hurley To: Greg Kroah-Hartman Cc: Jiri Slaby , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Peter Hurley Subject: [PATCH v2 2/9] n_tty: Ignore all read data when closing Date: Sun, 10 Jan 2016 20:36:09 -0800 Message-Id: <1452486976-7594-3-git-send-email-peter@hurleysoftware.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1452486976-7594-1-git-send-email-peter@hurleysoftware.com> References: <1452486976-7594-1-git-send-email-peter@hurleysoftware.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/tty/n_tty.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index fad365a..fb76a7d 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c @@ -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); } } -- 2.7.0