Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6997115imu; Thu, 31 Jan 2019 03:16:20 -0800 (PST) X-Google-Smtp-Source: ALg8bN5UFmYIrOo6o74vGVng0aOSG3u1k+fA+1d4shNnm6vxHPRW9d9+3dvgsVZkTS3muTVkNctF X-Received: by 2002:a63:f201:: with SMTP id v1mr29234431pgh.232.1548933380322; Thu, 31 Jan 2019 03:16:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548933380; cv=none; d=google.com; s=arc-20160816; b=vSCpwX+MjiMkrw2PReBtUOVOxp/DHoJ+x+HS9IRBo5EpzVIluBBNtCqaRgu2+BPDlf NNIL/c5PGpd/T9lgnIpTpWaWglbek/gtc/z58ds1QIC0jXkE4x9zB5E81/jxkFNVxtri n7l+V1QH69t0qmKd0eVyQR6Raq8y0lqvxFgZP5jrapPhPEa7mcXVDKuefz5GQn1QuTqN zdQQ9+9aRj1hVYngKIZbFtnQYgBSmaMz4slAEninjC7ucaLK/TXW+OZiYQi/rKLT9Imk DfanBI2vXJZW9zJctqMpBuqaqAzN7kab2SYVBOu5XfrcfX5XkgG/Z4PM0wZTi8aupqgR rLkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender: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=MMHnIc6B+bwdKMXIt1Hbcq6MQqyidqAKh1q+4D/zWqk=; b=K50ShOR9gdoF/IDCmVjdPS3rwiKK51lwzrh/0x/hHpzwXqXFSTqd5BBNb9nlemH+hp VYwIkMAeY3fDU4T4/SaP3qJRWhxlmAyVFQQV5PKX9WABpFHBcl0pqCEjX/5UIwMkM7OE R6RxaNaNhNOZ0pkbjPZq9yHpaNdVp55U70Rh+vXU0fUg0IphwDemcRvCzqSHq3XoqOZ2 UJxQ3tS6ItY2cZt3FII90EHhzQrk+qaOumnCc6bZy89ez1ahXWQgGABhRjOaMhOtZdic WN1jXyBK07howyHZPJkiriG40XoDzl2UADWuPUKdxeCiP1EReo09eaM+OWKjxNi2cXjX aVCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d13si4313770plr.403.2019.01.31.03.16.02; Thu, 31 Jan 2019 03:16:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727204AbfAaLP5 (ORCPT + 99 others); Thu, 31 Jan 2019 06:15:57 -0500 Received: from mx20.baidu.com ([111.202.115.85]:60172 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726221AbfAaLP4 (ORCPT ); Thu, 31 Jan 2019 06:15:56 -0500 X-Greylist: delayed 91821 seconds by postgrey-1.27 at vger.kernel.org; Thu, 31 Jan 2019 06:15:53 EST Received: from M1-MAIL-EX16.internal.baidu.com (unknown [10.44.89.56]) by Forcepoint Email with ESMTPS id B4D18E0B0454F; Thu, 31 Jan 2019 19:15:47 +0800 (CST) Received: from BC-Mail-Ex13.internal.baidu.com (172.31.40.49) by M1-MAIL-EX16.internal.baidu.com (10.44.89.56) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1531.3; Thu, 31 Jan 2019 19:15:48 +0800 Received: from BC-Mail-Ex13.internal.baidu.com ([172.31.40.49]) by Bc-Mail-Ex13.internal.baidu.com ([172.31.40.49]) with mapi id 15.01.1531.010; Thu, 31 Jan 2019 19:15:48 +0800 From: "Li,Rongqing" To: Greg Kroah-Hartman CC: "linux-serial@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "jslaby@suse.com" , "gkohli@codeaurora.org" Subject: =?gb2312?B?tPC4tDogW1BBVENIXVtWNV0gdHR5OiBmaXggcmFjZSBiZXR3ZWVuIGZsdXNo?= =?gb2312?B?X3RvX2xkaXNjIGFuZCB0dHlfb3Blbg==?= Thread-Topic: [PATCH][V5] tty: fix race between flush_to_ldisc and tty_open Thread-Index: AQHUuVN9LlUBqVRgFUmO4OHgZ/3XQqXJN3hQ Date: Thu, 31 Jan 2019 11:15:48 +0000 Message-ID: <22a5d8639b154119af7d7661e17025f2@baidu.com> References: <1548927796-11348-1-git-send-email-lirongqing@baidu.com> <20190131105527.GB8271@kroah.com> In-Reply-To: <20190131105527.GB8271@kroah.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.24.150.64] x-baidu-bdmsfe-datecheck: 1_M1-MAIL-EX16_2019-01-31 19:15:48:537 x-baidu-bdmsfe-viruscheck: M1-MAIL-EX16_GRAY_Inside_WithoutAtta_2019-01-31 19:15:48:521 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DQoNCj4gLS0tLS3Tyrz+1K28/i0tLS0tDQo+ILeivP7IyzogbGludXgta2VybmVsLW93bmVyQHZn ZXIua2VybmVsLm9yZw0KPiBbbWFpbHRvOmxpbnV4LWtlcm5lbC1vd25lckB2Z2VyLmtlcm5lbC5v cmddILT6se0gR3JlZyBLcm9haC1IYXJ0bWFuDQo+ILeiy83KsbzkOiAyMDE5xOox1MIzMcjVIDE4 OjU1DQo+IMrVvP7IyzogTGksUm9uZ3FpbmcgPGxpcm9uZ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