Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751952AbbKIMRL (ORCPT ); Mon, 9 Nov 2015 07:17:11 -0500 Received: from mail-io0-f175.google.com ([209.85.223.175]:32832 "EHLO mail-io0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751613AbbKIMQi (ORCPT ); Mon, 9 Nov 2015 07:16:38 -0500 From: Peter Hurley To: Greg Kroah-Hartman Cc: Jiri Slaby , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, netdev@vger.kernel.org, Johannes Stezenbach , Karsten Keil , Martin Schwidefsky , Heiko Carstens , Jesper Nilsson , Mikael Starvik , Jiri Kosina , David Sterba , Mark Hounschell , Peter Hurley Subject: [PATCH v2 2/4] n_tty: Ignore all read data when closing Date: Mon, 9 Nov 2015 07:15:51 -0500 Message-Id: <1447071353-2961-3-git-send-email-peter@hurleysoftware.com> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1447071353-2961-1-git-send-email-peter@hurleysoftware.com> References: <1447020173-32207-1-git-send-email-peter@hurleysoftware.com> <1447071353-2961-1-git-send-email-peter@hurleysoftware.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 971 Lines: 30 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 bc613b8..2de0283 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c @@ -1564,8 +1564,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.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/