Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3040725pxu; Mon, 14 Dec 2020 18:55:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJwKxdBAXl3nFJFUloiWBjashdO62CeoebCYh9XVz6fTajv9c+WwBCfTB9iEc5OhzbCiGFkz X-Received: by 2002:aa7:c492:: with SMTP id m18mr5176450edq.236.1608000925127; Mon, 14 Dec 2020 18:55:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608000925; cv=none; d=google.com; s=arc-20160816; b=ANcbuSBlgfJrFQuz7SVY5gjdTzEXIhdYuvXQBB8nZWxYIpEFWqGmWKZHFQoIBtZmje I3TDnEanwnfUlLRwCakFm3uDabISXKsUdTRqMhCr1mN1WKYanbOY6h1T+v2CDSw/51QK fzBciVaR1tJy5DBsxpYYrtEdClKmAkG8nVjDzo6zL3E+ol2mNmR16WMAt20sLequM3uP nDavXnpf8oUA2hp3RdlI+IXYAfWIepJaH6dqA/4jRnBJ5yw2+FZi5rrU8bzrhKIQW5XT ZvHYLzdMYQYnVVyyCfvfZabn5asGKGZ2uj4wpCjj30gfIjPOKw3+Jd4tvA03MrukMcau UvRA== 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=+rs1w7C02wL5UTvP9ijy7t3yFWTPxd5uMkeqmK5xq2A=; b=BDJKgZyW59OHI2hg6j4EDFigvfb1rlEB/8SNIkXzld+VhJj/NjdOivWmBXIV1WWxa/ XPbQEQEgdzlddZc7uXCacQMlGr+3fwyri8dRL0OYz26uAOau0kK1t5Vx7XDEISTQcRoP T+S9JPaOkV3Gx7ZpXNiUqAbRxNTxlcs//q517ut/7adROll8nq6yKK8LvvA7/gLpyox+ bKd6Rz8vNL8cmTmp9Fks8bW2QBb2nQm0B6gvQ2l2A3p1FmCk/UM/Jmm1n7aAvN2oLPWB xQ9rKcR2SUppZuOkPympFJ7zFuZ7BlutLSbUFBbh6ZZ2maTXP1sFJcG2SJz2wbQ2fce7 Twtg== 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 p19si205998ejc.398.2020.12.14.18.55.01; Mon, 14 Dec 2020 18:55:25 -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 S1726004AbgLOCqy (ORCPT + 99 others); Mon, 14 Dec 2020 21:46:54 -0500 Received: from smtp.h3c.com ([60.191.123.56]:11440 "EHLO h3cspam01-ex.h3c.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725960AbgLOCqx (ORCPT ); Mon, 14 Dec 2020 21:46:53 -0500 Received: from DAG2EX05-BASE.srv.huawei-3com.com ([10.8.0.68]) by h3cspam01-ex.h3c.com with ESMTP id 0BF2j0q4076414; Tue, 15 Dec 2020 10:45:00 +0800 (GMT-8) (envelope-from tian.xianting@h3c.com) Received: from DAG2EX03-BASE.srv.huawei-3com.com (10.8.0.66) by DAG2EX05-BASE.srv.huawei-3com.com (10.8.0.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 15 Dec 2020 10:45:01 +0800 Received: from DAG2EX03-BASE.srv.huawei-3com.com ([fe80::5d18:e01c:bbbd:c074]) by DAG2EX03-BASE.srv.huawei-3com.com ([fe80::5d18:e01c:bbbd:c074%7]) with mapi id 15.01.2106.002; Tue, 15 Dec 2020 10:45:01 +0800 From: Tianxianting To: Gaoyan , Greg KH CC: "jirislaby@kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] [v2] tty: Protect disc_data in n_tty_close and n_tty_flush_buffer Thread-Topic: [PATCH] [v2] tty: Protect disc_data in n_tty_close and n_tty_flush_buffer Thread-Index: AQHWzp15R3HHapquR0yjLRUc9puBZanvVhAAgAGO34CABpYJgA== Date: Tue, 15 Dec 2020 02:45:01 +0000 Message-ID: References: <20201210022507.30729-1-gao.yanB@h3c.com> In-Reply-To: Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.99.141.128] 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 0BF2j0q4076414 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgR3JlZyBLSA0KQ291bGQgd2UgZ2V0IHlvdXIgY29tbWVudHMgZm9yIHRoZSB1cGRhdGVzPyAg VGhhbmtzIA0KDQotLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KRnJvbTogZ2FveWFuIChSRCkg DQpTZW50OiBGcmlkYXksIERlY2VtYmVyIDExLCAyMDIwIDI6MDkgUE0NClRvOiBHcmVnIEtIIDxn cmVna2hAbGludXhmb3VuZGF0aW9uLm9yZz4NCkNjOiBqaXJpc2xhYnlAa2VybmVsLm9yZzsgbGlu dXgta2VybmVsQHZnZXIua2VybmVsLm9yZzsgdGlhbnhpYW50aW5nIChSRCkgPHRpYW4ueGlhbnRp bmdAaDNjLmNvbT4NClN1YmplY3Q6IOetlOWkjTogW1BBVENIXSBbdjJdIHR0eTogUHJvdGVjdCBk aXNjX2RhdGEgaW4gbl90dHlfY2xvc2UgYW5kIG5fdHR5X2ZsdXNoX2J1ZmZlcg0KDQ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