🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #9136

Re: [PATCH] rxrpc: Serialize client connection IDR updates

#9136
From: Andrew Lunn
Date: Sat, 31 Oct 2026 13:43
37 lines
9794 bytes
On Thu, Oct 29, 2026 at 09:21:29PM -0700, Kyle Zeng wrote:
> The common connection destructor calls rxrpc_kill_client_conn() for
> service connections as well as client connections.  A service connection
> gets its CID from the peer and never owns an entry in local->conn_ids.
> Its destruction can therefore remove an unrelated client connection.
> 
> The final reference can be dropped by the service reaper or a call
> destruction worker, outside the owning local endpoint's I/O thread.
> Client connection destruction can also run off-thread, and can remove an
> ID already released by rxrpc_unbundle_conn().  These writers can race
> idr_alloc_cyclic(), corrupting the radix tree and its RCU callbacks.  A
> second removal can also delete a new owner after an ID has been reused.
> 
> Only run client cleanup for client connections.  Restore a per-local IDR
> writer lock and the client-ID ownership flag, clearing the flag under the
> lock when releasing the ID.  Serialize IDR destruction with the same
> lock.  This covers deferred final puts without changing connection
> expiry or the RCU lookup path.
> 
> Fixes: 9d35d880e0e4 ("rxrpc: Move client call connection to the I/O thread")
> Signed-off-by: Kyle Zeng <kylebot@openai.com>
> ---
> I have a reproducer for this issue and can share via DM

Please take a read of

https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html

You need to set the subject line correctly to indicate the three they
are applied to.

All the patches you have posted are very likely to be sent to
/dev/null because of this. It is a good idea to start slow, only one
patch at a time, and figure out the processes.

      Andrew
Technical Details
Message-ID: <d2f67f23-8535-4965-a9bc-f3fa16149bf8@lunn.ch>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-354082-linux-kernel-netdev=dewy.ru
References: <20261030042129.73690-1-kylebot@openai.com>

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-354082-linux-kernel-netdev=dewy.ru
From: andrew@lunn.ch (Andrew Lunn)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH] rxrpc: Serialize client connection IDR updates
Date: Sat, 31 Oct 2026 14:43:26 +0100
Organization: Usenet Network
Message-ID: <d2f67f23-8535-4965-a9bc-f3fa16149bf8@lunn.ch>
References: <20261030042129.73690-1-kylebot@openai.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="2467272"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:kpARAGtNomBGVqhFys5SweZErPw= sha256:SzEIL+5rB5f0dZxBoLAXSgqhqNYBo+9JHzLuHQaZoAE=
	sha1:Jjus6X5NPPK0FO/fHJdUf7WSsXQ= sha256:xDIBZb3B9NSlc2JwOQNv0gsfFPF5vrvRJ0BQsnUOMxA=
Content-Disposition: inline
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 8EE72125CB8; Sat, 31 Oct 2026 16:46:17 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 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, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	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 (1024-bit key)
	header.d=lunn.ch
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 k_1G6xFHkFoe;
	Sat, 31 Oct 2026 16:46:13 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-354082-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id ABF83125CB5; Sat, 31 Oct 2026 16:46:03 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 581402796A; Sat, 31 Oct 2026 13:43: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=1793454237;
	b=ITswidkfdmU/Ud98Xf8wi3dQ4BJ+0LY6eh7dzk/ag+AVoN09khrjT6zQlHWJWPtUYwvl
	 sQ8vZKN9Vz3dg8szsL3IaLRdylaZsFNrl+jo/oOrxMtcCN5QmLHXpRSaiRhRiGRaDLK33
	 z1gLgXzCfgbIX78orFI5KF0Tza6XGnKwuBKPZ/3kn+xcJe03Nuz2dsXdRlgzIEGMYYMyQ
	 8LeR+oJF8Zz0pLjm6FcVPYt8ke1U0UsFdvU+IwIqG2mdq0GwK4bgJaS/oCxOg8qc2l4/i
	 zaqbuSuBvvXQSOoDJ2wfm7RKfpOMLbAPvN1C2oDGaVv/mMhgJfDFnnlDS7QsDO70pmQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793454237;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date:
	 From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=P0O29ManTeKtpfhBPE9fT4zh0to6VFIKGUZDe3mDtyg=;
	b=zLfQpfnLsqgXH5ieCnWKHgGd7X+iJy+n56ydtkuhi6LEMc5459Cx25qPZj4rtgPtTM2X
	 zM9gLGV9kDqeR20oAw0tfk1Az0QE7k+YR9tyS3F3YVc7KQYOc1yyx2Sl3gcVHbSNJ4KRm
	 o600EwwiSZ5Ou4aPxynJvXwe2iSv6U9+T5JVeCfxFfINv9+OtH0gZg8cYvWvDnfz9ItE9
	 n+jpgIDp6uy5yYtR4I6PyJant4/8Q0Ns9rcRHyM/BT8faDUFTTV5lKK8OhILUNBakyje5
	 qGWLe2wQ30L08I3z6OfSM/vmQ6k+ewQzSsvlofCs8zv3kgnivsFwvE50b8kSyXfe8eA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=gWXg1lSc;
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	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 14B55606A31F;
	Sat, 31 Oct 2026 13:43:57 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=gWXg1lSc
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793454223;
	b=q8Zhapd3psm1L4u1jwjQYfHRRz2lp459raofgjd8Hme1MJHnO+QnhJ/NawxtD9NA26tN
	 TN1y2BhTZXt1FbD/7VsdVjPcTG4+pJvI3kZBtxJxCrHPxzz3IFNaFmY9/kmUr+ShlAkIo
	 9q4eiO1QTxyvXCiSsCYO+ii88x75d6A5zAX0LCUS1+GbJgaAKjH3pqLLGZybvJOiRtfsY
	 ml9FVg83KDreiWVQsZNUI/3D8nX3d30IuZhZKJ+eWEBR/21AWFZtj3iwleX1SMK0yNpWK
	 WMriiIO2rajTm9/hOjM/5Xz/O7BZ6tPqPwLQlarUQri4wFqq19QrlExWPtjpbYXEcwA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793454223;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject:
	 Message-ID:References:MIME-Version:Content-Type:Content-Disposition:
	 In-Reply-To;
	bh=P0O29ManTeKtpfhBPE9fT4zh0to6VFIKGUZDe3mDtyg=;
	b=Q9fMDWXTYrPq+y5JGXuwWt+FlAfO6fNuY0p/HrNVHmoVQEY/JZuWdKjI3LUe5BsEqMif
	 5PzlKuI9JYttr/aSXyVwl87jIS+VXrL7/FwtbzPnAiUxr0RVirtozVfCbtidm3Ntmxync
	 8OOqFxvptw9AjmulRm9OlWjqvsMGR2NpLMSnwQ7PlIycYs0Zhi2QeVYQV3/azRDarUF5P
	 tyCbwcJQAEMc6Gjq9qMKsUFnBXsNy4hXy7PBCjeoqQe0h0N8FS7E2SZjukd/FUXjw8eaq
	 1X85hPEQYnYb50O+FBLIpoHGCKfoKCRi2SAfBDx9GB+jQCRDWVw2xqhZ4x61xgtDiwQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=gWXg1lSc;
	arc=none smtp.remote-ip=156.67.10.101
X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101])
	(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 46547606A31E;
	Sat, 31 Oct 2026 13:43:42 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 46547606A31E
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch
X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch;
	s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version:
	References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject:
	Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:
	Content-ID:Content-Description:Content-Disposition:In-Reply-To:References;
	bh=P0O29ManTeKtpfhBPE9fT4zh0to6VFIKGUZDe3mDtyg=; b=gWXg1lScEuSJcAC4FFWPm8gZ85
	VTLub86ng2WutlicUJra7WZgCTd3OwapzhfOTBHIyHiwIXIVRfH4R/SOo7E1Ijur4BWR5Jt77CT+6
	BltnQ8+8oe7LXY6YHrMz9BTz4ZZtMKRYD5jEY/jGeqTUlh0/+BDi173mMngHnLihirSU=;
X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2)
	(envelope-from <andrew@lunn.ch>)
	id 1xN9Mk-00DWrK-S4; Sat, 31 Oct 2026 14:43:26 +0100
X-Cc: linux-afs@lists.infradead.org, David Howells <dhowells@redhat.com>,
	Marc Dionne <marc.dionne@auristor.com>, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, outbounddisclosures@openai.com
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-In-Reply-To: <20261030042129.73690-1-kylebot@openai.com>