Article View: linux.kernel.netdev
Article #22612Re: [PATCH net v2] vsock: only undo SS_CONNECTING when connect() fails
From: Michal Luczaj
Date: Wed, 25 Nov 2026 15:10
Date: Wed, 25 Nov 2026 15:10
38 lines
10919 bytes
10919 bytes
On 11/24/26 21:42, Bobby Eshleman wrote: > On Tue, Nov 24, 2026 at 05:17:56PM +0100, Michal Luczaj wrote: >> On 11/24/26 00:19, Bobby Eshleman wrote: >>> On Sat, Nov 21, 2026 at 07:32:15PM +0100, Michal Luczaj wrote: > > [...] > >>> So the attempt never times out, and a late OP_RESPONSE connects a >>> socket the user already shut down, overwriting SS_DISCONNECTING with >>> SS_CONNECTED. I think that's a separate bug for a separate patch, >>> though. >> >> Great, I'm all in favour of consolidation. So in the scenario above, >> invoking vsock_connect_close() on vsock_connect_timeout() (with sk_shutdown >> check dropped) would result in CLOSE/DISCONNECTING, and no more late >> virtio_transport_recv_connecting(), right? > > Right, that late response will fall through and get an RST back. I'm > not 100% sure yet about how to rework the sk_shutdown check yet > though. I mention TCP's approach to shutdowns in my reply to Paolo and > I'm thinking thats probably the right way to go about it, but not 100% > sure yet... > > Do we agree that touching vsock_connect_timeout() should not happen in > this patch? Is there anything pending on this one from your perspective > Michal? I think we're good. Patch fixes what started the discussion. And if I get this right, the only unintended side-effect is that shutdown/connect inconsistency, but the sibling thread concludes shutdown handling needs rework anyway. Reviewed-by: Michal Luczaj <mhal@rbox.co> thanks, Michal
Technical Details
Message-ID:
<23a40881-5e6c-4c4e-86c3-97f3500438e5@rbox.co>Path:
mbox-mo1.pugleaf.net!news-can.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371464-linux-kernel-netdev=dewy.ruReferences:
<20261117-vsock-connect-close-v2-1-db5388323770@meta.com> <ed28d36a-682e-4db5-abf4-1339734e7c57@rbox.co> <awTJ8EOl52W0ph1K@devvm29614.prn0.facebook.com> <ca274ecf-3525-4bf0-a525-0460b5ea2d28@rbox.co> <awX2oDI/Mbt+z6J2@devvm29614.prn0.facebook.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-can.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371464-linux-kernel-netdev=dewy.ru From: mhal@rbox.co (Michal Luczaj) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v2] vsock: only undo SS_CONNECTING when connect() fails Date: Wed, 25 Nov 2026 16:10:47 +0100 Organization: Usenet Network Message-ID: <23a40881-5e6c-4c4e-86c3-97f3500438e5@rbox.co> References: <20261117-vsock-connect-close-v2-1-db5388323770@meta.com> <ed28d36a-682e-4db5-abf4-1339734e7c57@rbox.co> <awTJ8EOl52W0ph1K@devvm29614.prn0.facebook.com> <ca274ecf-3525-4bf0-a525-0460b5ea2d28@rbox.co> <awX2oDI/Mbt+z6J2@devvm29614.prn0.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="239140"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:4DMxK6ALIPf31bXbngpicCGlB5U= sha256:EIBsF3CTTN+7LkgZ/Lovt+GcqK0c8VCQdTVl15U2TME= sha1:BZUR3TlMMcPZ5DM5a9LQ1uKmd7w= sha256:UeuANs5xFVqwnAJARu9xsREU8QSgq5wkGm32mrmdK9Y= 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 8AD56125E7B; Wed, 25 Nov 2026 18:12:28 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.048 X-Spam-Status: No, score=-3.048 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, URIBL_BLOCKED=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 eKuZFmBheGAl; Wed, 25 Nov 2026 18:12:24 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-371464-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 8C273125E79; Wed, 25 Nov 2026 18:12:15 +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 3402E456A5; Wed, 25 Nov 2026 15:11:21 +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=1795619478; b=y1scCHDmJqhSo0sh0swXxzle3GCpxzGRjvlLvqjgvZsdlXegESAdELVitji9naReL7Rv lOmMkVEW8eLebwHCEFnucPyVyzLbhUZTYJnOgrlxBRXaNFUYLgILQq3Mt2CtrcfpJrW0D qmGHpz849fZ4T5v+qgAZLQ26G7CgA/6dviWqfkAn8qI/H2ltcuPOGjI1xfrahxvXzFzS5 RRdPAywuiOjpxj9DeXIxasOK19AA911UlvkY+DbX1mMmTlrS+X4LOPDV+GvWIcPBXE8CF I6imCnJKNAWw9zZ9KK0xM+hDH0/1VKlBrflSj61y6ns8rC6KRO+vZPtWhUed7T+UlVA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795619478; 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=YuVk7FWWt2a2HgFMOsP1OlOGIeISBf3PZud268awzIs=; b=vMq+yJiAHbKdvRiXHBn5q1pkWrOiVcn2+dtZjUB1lG3in+DxUJvHQINeggC73EYdtyUl rWnkBFwxt1akDNE0HEaWhtuALb6KBVGQnM/6xo1P5vnwBR0H+f53BazUMZW/piUyr0GK2 GumOOKM4JN2AfYTz55JMSWRHkCjPXeHe9ZGNIatIf7/IlwXEuRzuKN7JWIT0YfdAhMnxX 1xpQ3J0as+8BvuoZUz+iUnxXL21kzNpQOFiImPhgOppc9aIbyi1u0SSRSTBnYWAnb1TUf ITrJY+H2UaIvOOaLY+hMujRqgqYcUEPvF0aHTOgBLqvcpOe35WEcNsHvlxuhW72pbfA== 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=FWhQ+OAU; 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 6344D606A33D; Wed, 25 Nov 2026 15:11:18 +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=FWhQ+OAU X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.226.149.37 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795619467; b=CMP1i4MMVIZKAvUOvW3Y3QeSyWx0zfGEPm0Neg1d0OeGVXieD9nhh4DHn66gF5wk2eId 2jNQruhm8HtFZ5LxNLQteb1mgEvyT12BPwzen7x3UTaNtBzu3LVnusKIlHsIr/zH/1fOr 1aINZQlSs849DdubUqvkbAqvjVm0sHr/C/QFt+wiDHeM6UvFDSHbY8S+ZcB1Rt1kO7Trh lH7w44/KvF3idCwUPzoZ28zOXyoXERIabhE1TVhfcY+aM8I5sV0wiH1ST6f+L2dHhrrEl 64zb76MiAn9BDy9BRTwBGjH9sLQB5p2oil9jJkUAaCGgnkv8h9HW/C50oYnoJE86+qw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795619467; 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=YuVk7FWWt2a2HgFMOsP1OlOGIeISBf3PZud268awzIs=; b=fmsvX0yXL+XpERNP6OF4IQAEEtuxbroJBGkLUMdMOM57AqzXA/HKVoJM4mreQlKX/PWe WKB0Z/73LW/Hg6BGhDFax2hsZLfDoluJ/q2ZIvE1Dfqojq/KSz1nhep4fdaSpLZ4DdMCF dCESbbhBfThmtWxLGhiRmsPvRROD2396QI1oMvT9ET+vFls8Orz0DObL8p6fGM9MAoCHS tyr+T0V9cDTPRPHOGrJ9zBfXocdPSPR5LtMIYd15sWxK9J965UFQI7aw8T8VPmwwp1mCy 4hhALOmEe4x7mBTSmLb4idiY7qCOqmSkEXpp4/andBOJhvYRUlrD+aK+Mu+xmkUytlQ== 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=FWhQ+OAU; arc=none smtp.remote-ip=185.226.149.37 X-Received: from mailtransmit04.runbox.com (mailtransmit04.runbox.com [185.226.149.37]) (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 2455F606A693 for <netdev@vger.kernel.org>; Wed, 25 Nov 2026 15:11:06 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2455F606A693 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 mailtransmit04.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from <mhal@rbox.co>) id 1xWEe8-009RvI-6T; Wed, 25 Nov 2026 16:10:56 +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=YuVk7FWWt2a2HgFMOsP1OlOGIeISBf3PZud268awzIs=; b=FWhQ+OAUsGgkL/eYfiOLnuFkTG Sz97d3d7RXubh8QvyZ8heuEk4ixRbHfNNLhaUupgSHqZPrSr+gIwFD1QaDEzHSoNS7ChmXWe28ReR ZodHLx7zEyJT31KjdULG1Oa3Hq7h8cbAajd3WgbarqCHLWF7r3hToY6xE2xVJSK9kBdwQa7RoZnEP oZUahagwYS4CdEGlJJPb97fo1yRADvFWNx9as1CD3PyrnHi+FO0t7yxTZqZhV41E+Rh68d6w0Whfg 6sHVbEPaaois8e0z79F0TYtmsUd9e/NvKL4ZjfDjjZ8mJ0e78h2jpidxD2J6CqRfiDVVV+N/7LbZP heA0YrKg==; 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 1xWEe2-00084M-CK; Wed, 25 Nov 2026 16:10:50 +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 1xWEe0-00B1cT-4T; Wed, 25 Nov 2026 16:10:48 +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>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, George Zhang <georgezhang@vmware.com>, Andy King <acking@vmware.com>, Dmitry Torokhov <dtor@vmware.com>, virtualization@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Kyle Zeng <kylebot@openai.com> X-In-Reply-To: <awX2oDI/Mbt+z6J2@devvm29614.prn0.facebook.com>