Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795929203; b=Z/A19vGj+lZMbkhS0yajL+f54GRTYq6NxSwjpKg055tzy0JtnHBW4kQpufA2yzBceXg0 aMzJO36bOGBvAakabl0Hrln9kBUp+tK1swHgkb2FOf5XyJPiL+Hff/e4LYfaz2epYeIGc kGH8WZ/vMpsLqIdu017vwG3TrA4Do0NcbKRCzVyLamgMU5Bn5QW+B5rLFv9ETZ3HvruWX Qjcf6EV+aw8FdKTBFAuxrCJn+f4IGEUeBTgzZNmoqh1ipJlxKl7pS0OkW/Na93avtF46T mNBBbm/rPo2xegx6nXzHjyAQ826vCau7PjDWNgwsd0cw/1eYrU4jLiGd5XkV6M/uypw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795929203; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=Di+ggPLqqVnhYVJcVR6hk5oIlBva4zjlk2lf9w6AC/E=; b=alrcCB1FOf5kBEfDnWPtOg9k8fcepUY9LzrP0XU6PZDgLTPle8HuAYWLRbUi0To9G09W OU9H36C2LRe+btnh6HZfMeAyxebtVdP2Qd9WBRpOj2/YeiyyBrA70VLQ4yFSqantySgzt dz6/VKOton089IFccuOfnUMhZPLoCUmORwO7ol0eLvkFYlRO/MQGru9FguhsenA+Zex/b vORr+wLoIu6dGWUXwVeob86i0Z9l2Mok8rKrkmXaoBRjc5yNYFZbkLTZksswNx0YiFPY2 W32TeqJX7U/7SC93GfW0C6KqgbbVPtbyyu3ggJD5+vZlolm1b/6t7dYaSvDhllQXLow== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="X/Y/lkTS"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E2FC606A31C for ; Sun, 29 Nov 2026 05:13:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=X/Y/lkTS Received: by smtp.kernel.org (Postfix) with ESMTPSA id CCA9B1F000C1; Sun, 29 Nov 2026 05:13:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795929203; bh=Di+ggPLqqVnhYVJcVR6hk5oIlBva4zjlk2lf9w6AC/E=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=X/Y/lkTSHc4Q32CD9pWYrpiVU5Vbeqx2PY6zU8JU95NCMcZe0/Xaw3MAaRAa07C+/ xmCACpgOSJMoVoRtJJcdttBNgBgCWYab9IPRdkRUEq5wEUevqfsq6SkHBUGIrHW3AN c1iYhiLiRojHNohz1qY6YyJqb+KFQtKBdxyzr9ImouBbRYZAMzVlUDx8cGIeY4VPdt 3Nvzua5h49/Cg5hPxFZaBV4Ke7BGJQvaxz/cTaZ6brRjH1R26eAUAcqatyZiujb3qP JmY9wloFX2512Ma7E79SWHgwxSsFfzfX+KEdQFPRwoXVxF47HtrxmNszT5MZeeoEtl Dywb3REWlka/Q== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH net v2] vhost/vsock: annotate lockless accesses to guest_cid Reply-To: sashiko-reviews@lists.linux.dev To: "Nguyen Dinh Phi" Cc: virtualization@lists.linux.dev, "Michael S. Tsirkin" , "Eugenio Perez" In-Reply-To: <20261129050514.1278990-1-phind.uet@gmail.com> References: <20261129050514.1278990-1-phind.uet@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 29 Nov 2026 05:13:22 +0000 X-Mailing-List: virtualization@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > vhost_vsock.guest_cid is written by vhost_vsock_set_cid() under > vhost_vsock_mutex, but it is also read without that mutex in > vhost_vsock_handle_tx_kick(), and vhost_vsock_get(). >=20 > KCSAN will report data-race if we issue VHOST_VSOCK_SET_GUEST_CID > ioctl while the device has TX traffic. For example: >=20 > write to 0xffff88810f1596ac of 4 bytes by task 7914 on cpu 1: > vhost_vsock_dev_ioctl+0x25f/0x720 > __x64_sys_ioctl+0xc2/0x110 > x64_sys_call+0x299/0x20a0 > do_syscall_64+0xc9/0x510 > entry_SYSCALL_64_after_hwframe+0x76/0x7e >=20 > read to 0xffff88810f1596ac of 4 bytes by task 7910 on cpu 3: > [ ... ] > READ_ONCE(). This also guards against compiler re-fetching or tearing=20 > if the surrounding code is refactored in the future.=20 >=20 > Fixes: 433fc58e6bf2 ("VSOCK: Introduce vhost_vsock.ko") > Signed-off-by: Nguyen Dinh Phi Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261129050514.1278= 990-1-phind.uet@gmail.com?part=3D1