🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #26585

[PATCH net v2] rxrpc: Do not return client slots for service calls

#26585
From: Andrew Stellman
Date: Thu, 03 Dec 2026 21:50
48 lines
12998 bytes
From: Andrew Stellman <astellman@stellman-greene.com>

rxrpc_put_call_slot() calls up() on the client call limiter for every
released call, but only client calls take a slot, in
rxrpc_new_client_call(). Released service calls therefore raise the
limiter's count: three completed calls to a userspace service took
it from 1000 to 1003, and closing a socket with three calls precharged
with RXRPC_CHARGE_ACCEPT raised it by three more.

Skip the limiter release for service calls.

The issue was found by Claude Opus 5.5 running Quality Playbook, an
LLM-driven code review tool:
https://github.com/andrewstellman/quality-playbook
The fix was drafted with OpenAI GPT-6 (Codex), this changelog with
OpenAI GPT-6 (Codex) and Claude Opus 5.5, and both were reviewed by me.

Fixes: b7a7d6740803 ("rxrpc: Impose a maximum number of client calls")
Signed-off-by: Andrew Stellman <astellman@stellman-greene.com>
---
v1: https://lore.kernel.org/netdev/20261202181321.74079-1-bugs@stellman-greene.com/
v2: Say that completed service calls raise the count too, as Sashiko's
review of v1 pointed out. No code change.

Tested on net 90ae4042bd9f in arm64 QEMU with KASAN, with test-only
logging of the limiter count: three loopback calls and three precharged
calls took it from 1000 to 1006 on base and left it at 1000 with this fix.
A reproducer is available on request.

 net/rxrpc/call_object.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_object.c
index 817ed9acb91e..11d4e37dbb21 100644
--- a/net/rxrpc/call_object.c
+++ b/net/rxrpc/call_object.c
@@ -281,6 +281,8 @@ static void rxrpc_put_call_slot(struct rxrpc_call *call)
 {
 	struct semaphore *limiter = &rxrpc_call_limiter;
 
+	if (test_bit(RXRPC_CALL_IS_SERVICE, &call->flags))
+		return;
 	if (test_bit(RXRPC_CALL_KERNEL, &call->flags))
 		limiter = &rxrpc_kernel_call_limiter;
 	up(limiter);
-- 
2.53.0
Technical Details
Message-ID: <20261203215031.26124-1-bugs@stellman-greene.com>
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376882-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376882-linux-kernel-netdev=dewy.ru
From: bugs@stellman-greene.com (Andrew Stellman)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net v2] rxrpc: Do not return client slots for service calls
Date: Thu,  3 Dec 2026 16:50:31 -0500
Organization: Usenet Network
Message-ID: <20261203215031.26124-1-bugs@stellman-greene.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2605498"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Fuf69pQZW9mR9RbCwfRUX3sqwvw= sha256:qMq+9Gt7+qaWiGMwtzJiuBC/AaVYLrmx0kG+b/IDnE0=
	sha1:EmHfbO6DRuQ2tpTa/DpJ2sb3Wqc= sha256:t8tviA6pHHtoDiNDRDtVMKDD3THSx8XMGrtqMprJvgw=
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 C7C3C117971; Fri,  4 Dec 2026 00:50:56 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.299
X-Spam-Status: No, score=-3.299 tagged_above=-9999 required=6.31
	tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.001, 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=stellman-greene-com.20260707.gappssmtp.com
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 AmZSoSiBDTWR;
	Fri,  4 Dec 2026 00:50:53 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-376882-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=stellman-greene.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 4BA47117A3B; Fri,  4 Dec 2026 00:50:44 +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 F03C825C37; Thu,  3 Dec 2026 21:50:40 +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=1796334635;
	b=gGw2hvFHMuvjebdQa0FnBVMAJXQBy+y+WGoi7/2jDBLTPw3+KNye3gR73y8wRpwLS698
	 cmRXwSjErhOpOa4pvCrBX897ZLpyhL1pA60mDrTx1rRzjwjrGoj42SkbFpd4qhx1agWEi
	 i8xkdRWcqX2f0uYeuPL84lWM+lOUZaITKIfnCpk2UbjW3cVf+SZ0qb6HuNRWvvXo99Dxm
	 6rH/ntU0E7JWvRNfAjiZkAvtD5+JcEi5VBUBq9yfO1OdorZUzbDTiyJpyd/j9qjFpr7RS
	 aA9CLp1JygIv+WyJ3IK3g8KoiO9IBkrMHClLSkORqaQaaR7NqPusbLCo23aFGxbK5sw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796334635;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
	 X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:Date:Message-ID:
	 X-Mailer:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=Olyubs3VfBO0nuRTAdN57wH7vT2lPxwsfsPYc8TkMYU=;
	b=2i5oWiyHL6QlIf/XTMj5yjIw9XgQ2KQO9XfQksMu75o8hSNXb0+S/YQksMJ1KyfDFCPg
	 dFDJvS0bfh01MEkVxJv8EnXpKaUYDJCH0tnSg3EIysE0+TaYSKoSFcCmQnVejIIX/4kGg
	 koQCkFGzhYKMICnrBI+c5aJtQQ+VvqR79kFCBwJNYW9gJtZk/wq+KU38T1Y8oS6Y2mmCv
	 BkcFkE3KRcnKkqr1VGJgbQdKLLXa3uVWkhBR1YmaToupBjY1EJDwwlv0gKxF2l763Kh1T
	 x8yIkG0ztivKF2OCMWiXP4+WUA1aF49hqd3sJk6vJXVaGiqgfX0+vB+Ft9z2XhwAKnw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=stellman-greene-com.20260707.gappssmtp.com header.i=@stellman-greene-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=h+hbWXuq;
	dmarc=none header.from=stellman-greene.com;
	spf=none smtp.mailfrom=stellman-greene.com;
	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 1C4AB606A334;
	Thu,  3 Dec 2026 21:50:35 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=stellman-greene-com.20260707.gappssmtp.com header.i=@stellman-greene-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=h+hbWXuq
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.222.172
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796334634;
	b=mFGAUKwxbcO1/cvtF6mVP1RA9kUNVjLQd4g4sblerQAOm81B/zetaXeU/8XJ8r0+5Ix3
	 AsTN1/dxVPxW4E3EliXSLU8no6j4s9sZXViO6keDn0DkllglDku559t5OWBflWzr3ebKR
	 AFtpwyB9no+KsEX5L6aCpb+C+WmpVBEmJRCT1DWPFc8T6hEcnAB4246WLkRQHPy/2eEuR
	 QBdSownnli4QUdntlmdpDnUlwCuNL10YhkS06HbLfqXUb1l9TVgW1UMQaMGNMQi1Jidrs
	 Goj8ONh3MT310WmOVfWVvuLjheVv2c8/01FjlnLmMQMEye4TpTuLD5yTwgSwje5gBlQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796334634;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
	 From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version:
	 Content-Transfer-Encoding;
	bh=Olyubs3VfBO0nuRTAdN57wH7vT2lPxwsfsPYc8TkMYU=;
	b=2ICfkDH08XsPOHjfhiTxUtu1j0yx6hZR8Iylz9bbVd55o2or35Q9B2gkX89FUTC4snaL
	 H1NFGhWfy34aXDDonOIoI+qxWU5OS0v0cUZbAWRLyW8EBdw+ybzqzh6baLZbhOOMaiAel
	 9qDIbwhcUytYVJ7WZJJZKZWOyc6zTEyxl8jEfW6zlZsHaFiowisrKP7wF4+PLWvuXzfVz
	 w/W2jZCadBM3HCT6AaVJ1j2Vjc1ejApCxlRQGdvBnKG9jvosPqRhhB/Fb6CwOyZyiLqaR
	 gp5qJ/qtQ4tN7aQRq2xQsxFS/IGXdWIM4luc8KV0eyJFuecJ3CJJyPITRagXyzvmxoQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=stellman-greene.com;
	spf=none smtp.mailfrom=stellman-greene.com;
	dkim=pass header.d=stellman-greene-com.20260707.gappssmtp.com header.i=@stellman-greene-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=h+hbWXuq;
	arc=none smtp.remote-ip=209.85.222.172
X-Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA916606A69A
	for <netdev@vger.kernel.org>; Thu,  3 Dec 2026 21:50:33 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EA916606A69A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=stellman-greene.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=stellman-greene.com
X-Received: by mail-qk1-f172.google.com with SMTP id af79cd13be357-94a7cf5badbso40927385a.1
        for <netdev@vger.kernel.org>; Thu, 03 Dec 2026 13:50:33 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=stellman-greene-com.20260707.gappssmtp.com; s=20260707; t=1796334633; x=1796939433; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:from:to:cc:subject:date:message-id:reply-to:content-type;
        bh=Olyubs3VfBO0nuRTAdN57wH7vT2lPxwsfsPYc8TkMYU=;
        b=h+hbWXuqWlJ7YI4Z9vX8lBpcSHfmcVklHA2yFRAr8qPPqlP4eVu14szZpneIyG9RN6
         ZEwttUak8rnfL8KoPoitWnBT+8EazXQwIAF/JtodtJwl4ctYqCqpPDu3QEnzhOxi8MPm
         eNt+cew798Gx2mobzOZi/9SyNO/Af36OsI5ZYycUQ82pfYtooC+IjhdU4bF3/89uors/
         glaFn6hzHLwDt9OcRUv0HB0cOMPhC7HlzKPUqn/g5F3Ek3wfITteX3KqWRfZrlvAqa7O
         qX0gnCjZJDJuf33Cs1eVsj05Oq4LbVAZsr3e6mt6NAvadySRLPfLUGMyx5a1DZUBIkYF
         QWOA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1796334633; x=1796939433;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=Olyubs3VfBO0nuRTAdN57wH7vT2lPxwsfsPYc8TkMYU=;
        b=frVaUH+m7oxHfFxbyVCm0lxWQScHgCLNGaGiKXEdH8KIHPqaNGAhgkOi9EBeguDHtb
         bU5A+jVlKlWAX9Ixh9DbsmLcfhgS4BKE37EcDQjKy4PBCrz1lLzZWhe2un6OPXqUMwAd
         vRu86nofq1mMHG+mwPIflJ7RLl0n48SkrehGDRu2SgC5kH/XYX9DPsQFucI7+M6jZfaq
         C5O7mWfeaUZDAObxZtnQsBIW5NsINiQWs8HbUztu5wTyG+tJm3WUPkoU1SAQ7G6Ipjjx
         ffHAmycI848wxq8QO7q5o2SUS962cC0gD/fbn+BGl14a8rHH2it8cyQ/eafbThBf+puO
         hLog==
X-Forwarded-Encrypted: i=1; AL+hErHELIWkgq22iQg85gX5PRyP41Z8yzgufxp6XXJGK1fV1qDwgl4feYZ4Auta/O+2nwV+gZN2OUs=@vger.kernel.org
X-Gm-Message-State: APuU4Z9Vpb6h82ZSCUGRmn6/UEu9rOuFnLtovyOlIUrv1bMTh+sWI65Y
	Hr36e60oa2E8LGy5icJN4B1Ua83WsKm5r8A+Cic1cRjj5nnGwpVvyyyXQ6y3aU/LL9s=
X-Gm-Gg: AZFdTZcuKJBSMqPXB06PmlSsE1yhPFVarKE5JeLsSAUT+MDTylXsU8ZYcJaK0Meb+gJ
	e/Yo+z2Tkh2Awm8/wUjptiqeuVsEz+J/cb/r0MI5bmoLAA8454mpBOX2NULuXCSd1xCHN01q1qo
	lsEC9ibzg246GvBJCl+puKiLdUm3lU+ElaRVQoHTkad81y08MhZpjw34sTtvAAIQJRo3zTR4X6S
	NW0FWY9GWCszF+8+//YqHwpM+R6uuZpde/JbJ1cxD0DDeGwFle/KcJyNgyn2vhyWy1muTNTVfR3
	mFfyZrU+rzyvFivqEdPi7i6RsabGCAuZ37NKaR71n51OQGshCNBqMR8ugH6/i9nOkIsXMwVwqmf
	pLx39RAFxc5Z8133mZG/fBl4nD8kD5p/qXMxrO5E3ZwuS/Z+LqnqBVPt43UK2NDmmpyrBV+cGEY
	TKEExmT5mqHMPnfjwOvEoGLSgMuFV6MtxHJM/EpLj6FqqHjaqNMK0zNRcI+2+cjf2Ypshk3Hm+J
	/GA5Oyc+JoMsludvA8CU+LoF3hJjfNmDUJsMwrE3PgKX+JQ27zg1a+uI57Vem1BoDfG35CkaiGA
	JX+iouEVJJPAYBg2uP1AUkfLqucQkVvXbuyP/Ow5cxBP47L9Xt9/tR5BJ29lsS0N+dm/zG2dyjs
	mKA==
X-Received: by 2002:a05:620a:2556:b0:945:d6e9:9a8c with SMTP id af79cd13be357-94a82e030a9mr497685a.33.1796334632778;
        Thu, 03 Dec 2026 13:50:32 -0800 (PST)
X-Received: from Mac.mynetworksettings.com ([2600:4041:5c28:200:c810:be07:df67:ac94])
        by smtp.gmail.com with ESMTPSA id af79cd13be357-94a7f49daa4sm52295085a.16.2026.12.03.13.50.32
        (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);
        Thu, 03 Dec 2026 13:50:32 -0800 (PST)
X-Cc: "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>,
	linux-afs@lists.infradead.org,
	netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
X-Mailer: git-send-email 2.53.0
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