πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #9597

Re: [PATCH net-next v4 4/7] vsock: add a netlink command to assign the g2h device to a netns

#9597
From: Michal Luczaj
Date: Mon, 02 Nov 2026 11:27
19 lines
10687 bytes
On 11/2/26 02:21, Michal Luczaj wrote:
> On 10/30/26 21:30, Bobby Eshleman wrote:
>>> virtio_vsock_reset_sock() and vhost_vsock_reset_orphans() are my pet
>>> peeves: state switcheroo without taking lock_sock(). Which, again, races
>>> vsock_connect().
>>
>> True, I don't love that either, but I feel the impact is at least
>> constrained by the fact that it only happens when the module or device
>> is already going away.
> 
> Doesn't it happen on suspend as well? Is so, with a poorly timed connect()
> things can go south on resume.

What I wrote doesn't really make sense, does it? vsock_connect() cannot
freeze midway, so SS_UNCONNECTED (due to virtio_vsock_reset_sock() flipping
state to TCP_CLOSE) can't be set. Sorry.

But it is still the case for bind/unbind, right?
Technical Details
Message-ID: <44aa83c2-042b-4d4f-9f9c-f9be8b0fccc1@rbox.co>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-354618-linux-kernel-netdev=dewy.ru
References: <20261020-vsock-guest-ns-v4-0-047527cfccfc@meta.com> <20261020-vsock-guest-ns-v4-4-047527cfccfc@meta.com> <atjZZP2ebhXKzMxL@sgarzare-redhat> <atld3+5LKmGxJ8+s@devvm29614.prn0.facebook.com> <atnjOZjKUBagRVWq@sgarzare-redhat> <d946003a-8bec-4e8b-89a3-05eeb96780cc@rbox.co> <auT+YIawHSMPHbJI@devvm29614.prn0.facebook.com> <5a411a67-f550-459d-be9b-5e8e51d3018c@rbox.co>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-354618-linux-kernel-netdev=dewy.ru
From: mhal@rbox.co (Michal Luczaj)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v4 4/7] vsock: add a netlink command to assign
 the g2h device to a netns
Date: Mon, 2 Nov 2026 12:27:10 +0100
Organization: Usenet Network
Message-ID: <44aa83c2-042b-4d4f-9f9c-f9be8b0fccc1@rbox.co>
References: <20261020-vsock-guest-ns-v4-0-047527cfccfc@meta.com>
 <20261020-vsock-guest-ns-v4-4-047527cfccfc@meta.com>
 <atjZZP2ebhXKzMxL@sgarzare-redhat>
 <atld3+5LKmGxJ8+s@devvm29614.prn0.facebook.com>
 <atnjOZjKUBagRVWq@sgarzare-redhat>
 <d946003a-8bec-4e8b-89a3-05eeb96780cc@rbox.co>
 <auT+YIawHSMPHbJI@devvm29614.prn0.facebook.com>
 <5a411a67-f550-459d-be9b-5e8e51d3018c@rbox.co>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="2911725"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:GxfWqo0ZS/5B0eh2okA0MdX2iuY= sha256:iCpXBdnDKD/BYkPe8H80JTyD5IbFEe1FrwqM+vCdSA4=
	sha1:HQooNjgstzedsmRbS/Qx3Fhqm58= sha256:55Q2lAanX0JsGvyR9VwrIiG02XHjgceSrYECckvjhw4=
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 CAC551124CF; Mon,  2 Nov 2026 14:38:34 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, 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 6jALHMSLy3Iq;
	Mon,  2 Nov 2026 14:38:30 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-354618-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 8C65E1124B7; Mon,  2 Nov 2026 14:38:21 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 83E092B8CB; Mon,  2 Nov 2026 11:27:57 +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=1793618872;
	b=DJcpJeCMoELQfU9hvB0IUTbaiwe89QLihVae9Eva6QEak24aq9UWNPEyWNbRlBDkPGgm
	 c3MDfJ7JGbQp+PgM359a+s4VtqMGaHXfqmK1I6cjTWO8kw3hD+8ep0MQFVCLler55J1S0
	 8MJ/K7mwUsdhQR9NjBlr0SBkyGlGGM60Rkuo9nv9q9ros7fXKAOguH4sfNAKhaLMyrA+X
	 3Hzc/c0fCEYDOYozHkXLG57xgq8rKvFDg7QW99iXSU48T9dp4dk/1GfhKrm/uVeGaXuNX
	 1ULgRgJdSVFbrqzllXBI4kQhgzbuOsKRXCdc7rz+8dgoA44rOb76b0lMCKBnDQ2aTww==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793618872;
	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=TEl1DgfXUA5pWV0ULqPFDtP6OTn2CRZgvQuqRoLVd2k=;
	b=y0wnHcHMEF7fGfCl8Y0jnuCxwe0E2/tC56uH9p1tY6gls9UAYmoNWXF457R7jA4zWyg8
	 /tKAcF0Jh8g4PnlnmEGso1dRmgoj3H+B2rCn8lu31xRWS6AooL45m+Hx51b7VOliUqq/9
	 UKCN5kxlYPw81fQ83dTpawF0OjTO0iHwjtqMz3Um2rE2V6plnkS8N8X1mDQ6UaP5t4KfY
	 y4J6FiXYU5lUrPJt9naFJeYtv0enbZp4r5FUCRMyY7dOBYgNGGF7jv/PxiURvBmomiUnt
	 W/1fLCa2A+JhJyNW5RXSwKiwduaDp5yFO8LotCRYDeNg1AK0r1iS5EXzUr4XvLZXngg==
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=UdlUnKwa;
	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 675A2606A331;
	Mon,  2 Nov 2026 11:27:52 +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=UdlUnKwa
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=1793618866;
	b=yEe4wC9p4ma/snLNFqcdK6Ed9TIMLS1hNKUtIWv64Gl341kAxuFwTGaKIyijIsuudJ2I
	 oJ0UnT0UxVLi8GXY18yaGwIgvzJsVJ90dqNgJ3XeMC09P8TALWA9aeSEQUmIoinqJOFiS
	 Sxt2qdhd8/N84E+bCqJ/6o1YFHmBJd5V86mUT6XVZgmX8tQe76eWVhzWEPttmh9QmWbAP
	 15NQcgQJn4+lvfp9T69dxRf0nrnuKSiW7rMwFF2V5HB/eqiGRV/6hdbqpG2xVR8Puzcju
	 yw3xh/K+q8NN3nN0nAoXj9E5DAnWBVjxjf/8FssE2qsSP4bARpY2mzNQUDAk6rKBBHw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793618866;
	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=TEl1DgfXUA5pWV0ULqPFDtP6OTn2CRZgvQuqRoLVd2k=;
	b=vbME1SJBQaK+iwRWiw/uKNi+6hiJ1OwGddbf/odL7moRVQbsxGx6vgGNaD/mbZ55jXQr
	 E2Y57LShEWdYUZ9GRUsqTIqLW0nqeFDdJW2zo0mApEOQD/Xnh4ZR0Lpf/2tF+Ae9lvNn3
	 O6hIS1rcWPoncUftc+IxaArHoeL/AOyEFdwNys7JZgzWQ8SaQAqCY5cI87yemTFuo1rJ1
	 qIOIvuGTKkKHDbw/sBjjY5CaiaFISlnkvenhfc+iNuKffx+BdIbz356f9XGdulsMUQQfR
	 VYAM0szThOhE4OMUlxkl/4K14seM8uVYwMPNHB2olUoKq+L/omtQ5Jin3vxH0201EpQ==
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=UdlUnKwa;
	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 0C27D606A32C;
	Mon,  2 Nov 2026 11:27:44 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0C27D606A32C
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 1xNqCJ-00BSF2-62; Mon, 02 Nov 2026 12:27:31 +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=TEl1DgfXUA5pWV0ULqPFDtP6OTn2CRZgvQuqRoLVd2k=; b=UdlUnKwa2wwdsv4p1NZcbSZeV7
	t4UOZnJaFeNb1oOLIegteX+/dZrJeyljqcQ8j+DemSAkcNZ9NA6RWxLB1qHZwZpB51BTC6BQllue7
	kUMdtmojCpnGTa7941e3k/nOmpzV90w9kZJo+S6M0WLvFJcPy3x0eW7Okn9UrI0Mho7XOqc1/gDPz
	J7OgLEcen16fXD3G+0uHsUVhj/SkBoJl+XumCZkg+45U3u6GRIH5EaDajhTqxh8WHW1GAr4INWy4d
	nUkOjpuLeOMmHg40TB5oRoTVszVeAuf/LQnMd7teaFJCfeGJI7wxfjhsnD0t6bOizG7rupdqMfw7W
	shLj9clg==;
X-Received: from [10.9.9.73] (helo=submission02.runbox)
	by mailtransmit03.runbox with esmtp (Exim 4.86_2)
	(envelope-from <mhal@rbox.co>)
	id 1xNqC6-0001gG-1k; Mon, 02 Nov 2026 12:27:18 +0100
X-Received: by submission02.runbox with esmtpsa  [Authenticated ID (604044)]  (TLS1.2:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
	(Exim 4.95)
	id 1xNqC0-00BRqT-Uz;
	Mon, 02 Nov 2026 12:27:13 +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: Stefano Garzarella <sgarzare@redhat.com>,
 "David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>,
 Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
 Jonathan Corbet <corbet@lwn.net>, Shuah Khan <skhan@linuxfoundation.org>,
 Stefan Hajnoczi <stefanha@redhat.com>, "Michael S. Tsirkin"
 <mst@redhat.com>, Jason Wang <jasowangio@gmail.com>,
 Xuan Zhuo <xuanzhuo@linux.alibaba.com>, Eugenio PΓ©rez
 <eperezma@redhat.com>, Shuah Khan <shuah@kernel.org>,
 Randy Dunlap <rdunlap@infradead.org>, Donald Hunter
 <donald.hunter@gmail.com>, Eric Dumazet <edumazet@kernel.org>,
 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
X-In-Reply-To: <5a411a67-f550-459d-be9b-5e8e51d3018c@rbox.co>