From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41B7C3C1F; Mon, 13 Jan 2025 07:49:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.32 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736754559; cv=none; b=j5FoSNoLphJCWQW7l3J22fZAw23F2h5uvbszlQ2ZRVqWsA6w9L8BkpM8tkB9aGZrES+Q57sAwdaJ8ywOo8zmsUMLOs9g4sZEyD/lqbQctljLXAeeB2eXp91EM8dt2UCDQGP7ket4G4mlk3RSL3TYv2czqRmtjOjdtAXSJ4Mra0s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736754559; c=relaxed/simple; bh=FnN71iyjFIJmgiI/6QSVhhE9UDtgpu8STC1sn+73TYw=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=jFbA+TWMgn7Ga5v6sqZePFoGPyVRkHYrJvjOgvNWElCUtDbSakAkhs/9EubtC58NOxx369na3iZaDwr7JlGivAnxDsIk3irclePAHfyLZiwh2psuVxa8/p08ULEKfvjIkEyGptbj8SYEHjoSoKng03noeoNqMAndA2WLd7069I8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.162.112]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4YWktK3kt2z2y8vY; Mon, 13 Jan 2025 15:49:29 +0800 (CST) Received: from kwepemd200010.china.huawei.com (unknown [7.221.188.124]) by mail.maildlp.com (Postfix) with ESMTPS id D8C081402C3; Mon, 13 Jan 2025 15:49:05 +0800 (CST) Received: from kwepemd500012.china.huawei.com (7.221.188.25) by kwepemd200010.china.huawei.com (7.221.188.124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Mon, 13 Jan 2025 15:49:05 +0800 Received: from kwepemd500012.china.huawei.com ([7.221.188.25]) by kwepemd500012.china.huawei.com ([7.221.188.25]) with mapi id 15.02.1258.034; Mon, 13 Jan 2025 15:49:05 +0800 From: lizetao To: Bui Quang Minh , "linux-kernel@vger.kernel.org" CC: Jens Axboe , Pavel Begunkov , "io-uring@vger.kernel.org" , "syzbot+3c750be01dab672c513d@syzkaller.appspotmail.com" Subject: RE: [PATCH] io_uring: simplify the SQPOLL thread check when cancelling requests Thread-Topic: [PATCH] io_uring: simplify the SQPOLL thread check when cancelling requests Thread-Index: AQHbZQBAfPWaG4hxx06y9utYvVroALMUVSEg Date: Mon, 13 Jan 2025 07:49:05 +0000 Message-ID: References: <20250112143358.49671-1-minhquangbui99@gmail.com> In-Reply-To: <20250112143358.49671-1-minhquangbui99@gmail.com> Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Precedence: bulk X-Mailing-List: io-uring@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogQnVpIFF1YW5nIE1pbmgg PG1pbmhxdWFuZ2J1aTk5QGdtYWlsLmNvbT4NCj4gU2VudDogU3VuZGF5LCBKYW51YXJ5IDEyLCAy MDI1IDEwOjM0IFBNDQo+IFRvOiBsaW51eC1rZXJuZWxAdmdl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