From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) (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 49FF33B1A1 for ; Wed, 15 Jan 2025 01:50:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736905843; cv=none; b=h8PZxD5T/EZkUAI5+l3YNLcSWOM4qtQlr4qlij2MSNPid0hBpvYRFPxCBDM87k8r4Aim7cGykeczkXqGzc+IRKgRtUO/+zI7kZbtOC4qE+vf1T9NgCXQqYvXCK/mVFcKm7n55aOfqdfWlyehya6ei4v9q6NQis6FFa2nSBFmoMA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736905843; c=relaxed/simple; bh=0k15K5k8FQbZNIDaQyU1xNwiMgVyy2PoRyHQ/dfVHqw=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=PPjKztGN1RHrpXEXMYUqk9YCPUq83VcsEfLBu6PMaVTptOqgshLA++dEnDQ+HNlfpGfYrJOkS/jijuzHzZlhUWMjydUWhgOi2x8WHC1TqRhyfgjaSOcCmlqSweNp1lbWZC1noUPGq94nJvpRRSnS4ra3Qec9Gqo2HwLotA3hnCQ= 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.189 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.88.105]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4YXpmS2LPmzRlH7; Wed, 15 Jan 2025 09:48:08 +0800 (CST) Received: from kwepemd200012.china.huawei.com (unknown [7.221.188.145]) by mail.maildlp.com (Postfix) with ESMTPS id B8003140417; Wed, 15 Jan 2025 09:50:30 +0800 (CST) Received: from kwepemd500012.china.huawei.com (7.221.188.25) by kwepemd200012.china.huawei.com (7.221.188.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Wed, 15 Jan 2025 09:50:30 +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; Wed, 15 Jan 2025 09:50:30 +0800 From: lizetao To: Pavel Begunkov , Jens Axboe CC: "io-uring@vger.kernel.org" Subject: RE: [PATCH] io_uring/io-wq: Fix a small time window for reading work->flags Thread-Topic: [PATCH] io_uring/io-wq: Fix a small time window for reading work->flags Thread-Index: AdtmKOA8sg05Tt97QvCw7GBc1hDbnwANI7kAACRZjJA= Date: Wed, 15 Jan 2025 01:50:30 +0000 Message-ID: <6d68ba2ae0d74895aec47379e94997cb@huawei.com> References: <5fd306d40ebb4da0a657da9a9be5cec1@huawei.com> <0993bb5e-debd-4513-9481-a7d93f8c3c25@gmail.com> In-Reply-To: <0993bb5e-debd-4513-9481-a7d93f8c3c25@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 SGksDQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogUGF2ZWwgQmVndW5r b3YgPGFzbWwuc2lsZW5jZUBnbWFpbC5jb20+DQo+IFNlbnQ6IFdlZG5lc2RheSwgSmFudWFyeSAx NSwgMjAyNSAxMj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