Article View: linux.kernel.netdev
Article #15051Re: [PATCH net-next v5 4/7] vsock: add a netlink command to assign the g2h device to a netns
From: Michal Luczaj
Date: Thu, 12 Nov 2026 10:34
Date: Thu, 12 Nov 2026 10:34
25 lines
9837 bytes
9837 bytes
On 11/4/26 02:53, Bobby Eshleman wrote:
> +/* Avoid breaking the socket when another thread has changed its sock->state
> + * while we were asleep.
> + */
> +static void vsock_connect_close(struct socket *sock)
> +{
> + sock->sk->sk_state = TCP_CLOSE;
> + if (sock->state == SS_CONNECTING)
> + sock->state = SS_UNCONNECTED;
> +}
> +
It'd be nice to have it as a separate commit. If I'm not mistaken, this
itself solved the vsock_connect() vs. transport reset
(vhost_vsock_reset_orphans(), virtio_vsock_reset_sock(),
vmci_transport_handle_detach()) races. And those were already reported a
couple of times, including a recent NIPA/Sashiko Severity-Medium[1].
[1]:
https://lore.kernel.org/netdev/179447093204.2199510.8895677421994612994@kernel.org/
thanks,
Michal
Technical Details
Message-ID:
<c34123f3-e006-4c25-b8d7-cdf0784926f4@rbox.co>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-361716-linux-kernel-netdev=dewy.ruReferences:
<20261103-vsock-guest-ns-v5-0-48179b9b66b8@meta.com> <20261103-vsock-guest-ns-v5-4-48179b9b66b8@meta.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-361716-linux-kernel-netdev=dewy.ru From: mhal@rbox.co (Michal Luczaj) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v5 4/7] vsock: add a netlink command to assign the g2h device to a netns Date: Thu, 12 Nov 2026 11:34:49 +0100 Organization: Usenet Network Message-ID: <c34123f3-e006-4c25-b8d7-cdf0784926f4@rbox.co> References: <20261103-vsock-guest-ns-v5-0-48179b9b66b8@meta.com> <20261103-vsock-guest-ns-v5-4-48179b9b66b8@meta.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="1061696"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:/8HYbbGaCzBhQkoAnf3Hh5HVcSA= sha256:ymiYsB/UcyFzoaNN6KnEj7zWCt6ThEYhA5JooKwBLGU= sha1:Axw+7Dgtb7tE/l9MUT2kbockOkc= sha256:GxdAWh4PBZPRU+nhH4GjXIBUqLFXUi0jTuiU/iNw+CI= Content-Language: pl-PL, en-GB List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 2F62D1141C3; Thu, 12 Nov 2026 13:37:12 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.149 X-Spam-Status: No, score=-3.149 tagged_above=-9999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=rbox.co X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fudHXmADKHsh; Thu, 12 Nov 2026 13:37:09 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-361716-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=rbox.co X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id 05F9F1141B2; Thu, 12 Nov 2026 13:37:00 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id 0AF9561F8EC; Thu, 12 Nov 2026 10:35:39 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794479724; b=BqbN2HfwUlMn0SOaIW3Zfg2Wm860YrnmGWfUfZFs84Y0LBis6srdjNEIRVD2qOCwZxVc ahsc7CZjKdOXl4CDdC6sALe2OnCA47xW8y81J9TrEAXPyyBCMAhyYC8OSb/WPbiLp+DDN UvaWq05GmMc08nq/m2mXUT4bWpcQ8GDlz43oiU1vzoPd+ud1+R4Gt9ihREKryifI/kIak 0pk7BGt7m9Yr6rL/49RVrH61xxi9GKGtn20I6V1CkE3cAIk7gMg0F7GNtNsQGW7guzRy4 TxQKLcfDShmsrbi34WC2CAcRbcofWZbicQ6E1bkrPNLp+jN080v4l1sXD0lXCTwC0fw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794479724; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:Received: Received:Message-ID:Date:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: User-Agent:From:Subject:To:Cc:References:Content-Language:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=72sPZJMfQhmbB1ZVGdOBB0ZnPu9Ix7ckpmn4Q/SFcLw=; b=lw4KrvrU8ZVFvjGAm6pqiK2O8zgQv91xNIviu3OSue2msXIVg85SFlyYLjk7Oc/UTNzM oiLun5k4EH1kPUWQ959apk7H05lqzDf0Tgy3cGuP6hmARD/UMlqPfJwiReaKN5rNfSHOI PfoIFOZBugGXmYgdpgI9LkJdmeK87u5rH3wZQY4Pyzrfz/1yZ5ugMkfaRydBtRjAwXeJ4 LweMiaxM/iC1mITLPH+G2McKrjnNGG2Sxnj0Dbd3Fzv4I78fXggZXZW4UlH6/T3anYeq2 E5lMb6sPtZCZsUGclbOGBRkve5Rly5s9q17KqXQFn//xcQjyDLetyIcgS4V9lGclqyg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=rbox.co header.i=@rbox.co header.a=rsa-sha256 header.s=selector1 header.b=KMoVWYKV; dmarc=pass header.from=rbox.co; spf=pass smtp.mailfrom=rbox.co; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F23AE606A337; Thu, 12 Nov 2026 10:35:23 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=rbox.co header.i=@rbox.co header.a=rsa-sha256 header.s=selector1 header.b=KMoVWYKV X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.226.149.38 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794479723; b=GLsICmCb4klxOURuHAW4HxtX4WMm6y5bA0YsshLnU2KA6/D7hDcXiDhVIfGZz8v3Yv79 Iboe7drTmkKIduy1FWOLQ+CsUBhJBd5AUJ58Ltwzn3jAdj0HBdzzj8RvEjQ/9twKC4L3a bK9CbyB84cK53IqWkxiTmy7GrB0OH0XpATUDyNbDtLwcR64yd4AlQgW3ImoCyyjxK6i21 4EkXrSyFXVktZyHMZ+SA28wGkl8CrOeWpGT4mDxYTz7t4nrBGcByEL9sniQF/zrZmIAzV EfT9OZ6e3rL0ZUw9We3AE0+deYVmBfzt19m8BUga2Tl4KXGVWgMnEIP4J1aE2LYEegg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794479723; h=DMARC-Filter:Received:DKIM-Signature:Received:Received:Message-ID: Date:MIME-Version:User-Agent:From:Subject:To:Cc:References: Content-Language:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=72sPZJMfQhmbB1ZVGdOBB0ZnPu9Ix7ckpmn4Q/SFcLw=; b=adq6HcM2DSSJNpCZ6i2y7AkD63UzX02CdznlqjkNfjDONo6inLYXAWtEjL29kfqihUof bjOLTBbyN7qq5Hy7APh6EDxQQBE/q0z+gGGyU4EYKqnzYPAGYFs+ISQZGl/2zmlIn8e4Q qmprxekiHrFoJ0c6cjXLYyu54yhf8NDtqRu4QVzRqrqRg/mD9ai+9vQH1o8ooz/vkHKPE HwxP0dv7CX1DlgsDdNtxnoorhBAFo8yhCV1bb7Kr5GQiwjvv9YmbpusO0W8/Rc4WqXNIh z7gcDiTOwq1TY3Lp+bn+mIke/9IXFJXdlqHF+ZS9R2MeGmnSqbUIk1jateAQXQUM6ig== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=rbox.co; spf=pass smtp.mailfrom=rbox.co; dkim=pass header.d=rbox.co header.i=@rbox.co header.a=rsa-sha256 header.s=selector1 header.b=KMoVWYKV; arc=none smtp.remote-ip=185.226.149.38 X-Received: from mailtransmit05.runbox.com (mailtransmit05.runbox.com [185.226.149.38]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1092606A31C; Thu, 12 Nov 2026 10:35:22 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D1092606A31C X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rbox.co X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rbox.co X-Received: from mailtransmit03.runbox ([10.9.9.163] helo=aibo.runbox.com) by mailtransmit05.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from <mhal@rbox.co>) id 1xRS97-004t4u-6j; Thu, 12 Nov 2026 11:35:09 +0100 X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rbox.co; s=selector1; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References: Cc:To:Subject:From:MIME-Version:Date:Message-ID; bh=72sPZJMfQhmbB1ZVGdOBB0ZnPu9Ix7ckpmn4Q/SFcLw=; b=KMoVWYKVM9ilqL/7/iePaxMMJT LJH6p8ZLBGMuep6DAZfoys0ulDMYxtbO36uhOv4dbLDelpjGo/B6a4pIdM9H9C5a1F7S5xQt9rQZ/ lP1tsoZfsiqwFevIYwrBVVGDVTH7Hwrn0rT/kTT4wlztFmzbJhsik9m61b261BTGtSHgWM11faKkh jI3BSwSDhPIlu902BhqFRrxXz3ZAaal6mhEGarI59C+6DWiU0NnXvTDTDNY9IogpnFWEA9iXjHQks WDy09gta1O+IN+NdAVunXUsTvWE95SnuhIK54bF3/nvb1H9oeUZVsBrgyAGuW6cW6r4ucn6plgLZh UthB9QPg==; X-Received: from [10.9.9.72] (helo=submission01.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from <mhal@rbox.co>) id 1xRS8v-0002tw-C3; Thu, 12 Nov 2026 11:34:57 +0100 X-Received: by submission01.runbox with esmtpsa [Authenticated ID (604044)] (TLS1.2:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) id 1xRS8p-004y3a-GT; Thu, 12 Nov 2026 11:34:51 +0100 X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-User-Agent: Mozilla Thunderbird X-Cc: virtualization@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, sargun@sargun.me, jlinbox@meta.com, Bobby Eshleman <bobbyeshleman@gmail.com> X-In-Reply-To: <20261103-vsock-guest-ns-v5-4-48179b9b66b8@meta.com>