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 3FA248493 for ; Tue, 14 Jan 2025 02:06:53 +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=1736820416; cv=none; b=aXRx4q7+BFjM8TzH7btNWM5BjOgxvqEL0eg0sc6EsuF5JndMO5OYT4LNzq/wcqX1n/6XM+YJfh++qIhLzrJVulbVG9yC061xr11sQqx9Arj0bqOcdcVMjMbJg+P89+xHFnDOD1eqY3ZdX/w+iotIueBPSNsiiTJ99FG1iOVThU4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736820416; c=relaxed/simple; bh=YgaC0fzUTNraUPayw/nF1wraGESscFUv5sbDTjUJlII=; h=From:To:CC:Subject:Date:Message-ID:Content-Type:MIME-Version; b=mGJHvS07VCti6o7VjFDSaO2v1w8ggazQc5YZnjNmQ8BiO0vbZruxGIugDHg9CfjqiSP/FoSDy8HQc0Wpm22UUklu3fKx+rXXGOECxbCUbXCQzROg9etb7MX6l0Dfw5Pdbly4VpGfcpycPWHkfoU+rHAJMIoD8yH79+TaUVodEdc= 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.163.48]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4YXC9n6PgrzRlHP; Tue, 14 Jan 2025 10:04:29 +0800 (CST) Received: from kwepemd100010.china.huawei.com (unknown [7.221.188.107]) by mail.maildlp.com (Postfix) with ESMTPS id 4158A1802E1; Tue, 14 Jan 2025 10:06:51 +0800 (CST) Received: from kwepemd500012.china.huawei.com (7.221.188.25) by kwepemd100010.china.huawei.com (7.221.188.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Tue, 14 Jan 2025 10:06:50 +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; Tue, 14 Jan 2025 10:06:50 +0800 From: lizetao To: Jens Axboe , Pavel Begunkov CC: "io-uring@vger.kernel.org" Subject: [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: AdtmKOA8sg05Tt97QvCw7GBc1hDbnw== Date: Tue, 14 Jan 2025 02:06:50 +0000 Message-ID: <5fd306d40ebb4da0a657da9a9be5cec1@huawei.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 VGhlcmUgaXMgYSBzbWFsbCB0aW1lIHdpbmRvdyB0aGF0IGlzIG1vZGlmaWVkIGJ5IG90aGVyIHRh c2tzIGFmdGVyDQpyZWFkaW5nIHdvcmstPmZsYWdzLiBJdCBpcyBjaGFuZ2VkIHRvIHJlYWQgYmVm b3JlIHVzZSwgd2hpY2ggaXMgbW9yZQ0KaW4gbGluZSB3aXRoIHRoZSBzZW1hbnRpY3Mgb2YgYXRv bXMuDQoNCkZpeGVzOiAzNDc0ZDFiOTNmODkgKCJpb191cmluZy9pby13cTogbWFrZSBpb193cV93 b3JrI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