Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4560751pxu; Wed, 9 Dec 2020 22:43:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxP9KGMOwvegvckHZxLD+YGUG6xwsMqcSS1rhlGpajFhflkkIENmIYx+WQaVu3YLZ8t0VuV X-Received: by 2002:a17:906:7243:: with SMTP id n3mr4994262ejk.246.1607582601500; Wed, 09 Dec 2020 22:43:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607582601; cv=none; d=google.com; s=arc-20160816; b=UmleXXRiIjJMHRzyg8UCrJFyZeECnR/w9xojtPQ2jrJfAH0FMTnOqVrROVc4ipGJK0 KJp6Xee45QMr1FCLgYHSj+dqwP0snIayazjuFuPu0ylErVOUyNogE4non9i+S7rJ34uf GJ9Kq16OfZCCZlfFqHk5w88oonEY2F2K3xOOVxbkqfEOUWZHXV9LC73yQ6u4y17fhghg 5nbiEboJs729vPXY3zBUOhrpbSbz2fRzSMlhwEdRtASh6ZnAelzbBbMwiN08lplnyZjf qTs32SrDtPdsSmuEZ+i1Lp0qN3gwFAGPBNRuPPFEs4l4Yy1cNTiXk4sU1rCCr6er70Ss bxPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=UbQfOUMg/U41cAz24tgmreC/XUGtOGbLNhSCoflzptc=; b=tKd1kx6z/mYhL6viPCSRFpHbsa6xuSPF3uzb0m/z1ovPocMZwzS1d95ubZWwuGAA6y aROOa5ls1Mk8lxkogaA+t4t4PK6jeDOuKjr/qp5bI13ER64vyuyJirFMYWdkwfNizIz2 WLF/HoVnoVQ4ZB6yHk1FqImyiu6OQe6YNOC9T9zn3vJSKXDWlo6TOmAQPqtfuYT7/fSG Ng3Mw/rTF+6V67QsOmokFoLDHHfWh/NLukAmxdmqg0+z3nqNvPzwHSmyoemMSPEFU4Yh b65ZLRPwLHpWQH7Fk4vQE3oHbpmuo6uBePA7NvsfcPDYbKfpfi+J6uGtd8VdUOFqV45i GZ0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l3si2362907edi.333.2020.12.09.22.42.58; Wed, 09 Dec 2020 22:43:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730820AbgLJDs7 (ORCPT + 99 others); Wed, 9 Dec 2020 22:48:59 -0500 Received: from smtp.h3c.com ([60.191.123.56]:18359 "EHLO h3cspam01-ex.h3c.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729974AbgLJDs5 (ORCPT ); Wed, 9 Dec 2020 22:48:57 -0500 Received: from h3cspam01-ex.h3c.com (localhost [127.0.0.2] (may be forged)) by h3cspam01-ex.h3c.com with ESMTP id 0BA2rHa0069794 for ; Thu, 10 Dec 2020 10:53:17 +0800 (GMT-8) (envelope-from gao.yanB@h3c.com) Received: from DAG2EX10-IDC.srv.huawei-3com.com ([10.8.0.73]) by h3cspam01-ex.h3c.com with ESMTP id 0BA2qmhx068651; Thu, 10 Dec 2020 10:52:48 +0800 (GMT-8) (envelope-from gao.yanB@h3c.com) Received: from DAG2EX08-IDC.srv.huawei-3com.com (10.8.0.71) by DAG2EX10-IDC.srv.huawei-3com.com (10.8.0.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Thu, 10 Dec 2020 10:52:49 +0800 Received: from DAG2EX08-IDC.srv.huawei-3com.com ([fe80::81d1:43f5:5563:4c58]) by DAG2EX08-IDC.srv.huawei-3com.com ([fe80::81d1:43f5:5563:4c58%10]) with mapi id 15.01.2106.002; Thu, 10 Dec 2020 10:52:49 +0800 From: Gaoyan To: Greg KH CC: "jirislaby@kernel.org" , "linux-kernel@vger.kernel.org" , Tianxianting Subject: =?utf-8?B?562U5aSNOiBbUEFUQ0hdIHR0eTogUHJvdGVjdCBkaXNjX2RhdGEgaW4gbl90?= =?utf-8?B?dHlfY2xvc2UgYW5kIG5fdHR5X2ZsdXNoX2J1ZmZlcg==?= Thread-Topic: [PATCH] tty: Protect disc_data in n_tty_close and n_tty_flush_buffer Thread-Index: AQHWzhNvm8MbLcEgPUGsvs0TLXodL6nuT2OAgAFQ1XA= Date: Thu, 10 Dec 2020 02:52:49 +0000 Message-ID: <0f2088a0da65448598d8b6aad316da37@h3c.com> References: <20201209095921.40248-1-gao.yanB@h3c.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.99.161.27] x-sender-location: DAG2 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-DNSRBL: X-MAIL: h3cspam01-ex.h3c.com 0BA2qmhx068651 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgR3JlZyBLSCwNCglUaGFuayB5b3UgZm9yIHJldmlld2luZyB0aGUgcGF0Y2gsIGl0IGhlbHBl ZCBtZSBhIGxvdC4gQWNjb3JkaW5nIHRvIHlvdXIgc3VnZ2VzdGlvbiwgSSBjaGFuZ2UgdGhlDQpj b2RlLiBQbGVhc2UgaGVscCBtZSB0byByZXZpZXcgdGhlIHYyIHBhdGNoLiBUaGFua3MgYWdhaW4u DQoNCglodHRwczovL2xrbWwub3JnL2xrbWwvMjAyMC8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