* [PATCH net v2] rxrpc: Do not return client slots for service calls
@ 2026-12-03 21:50 Andrew Stellman
0 siblings, 0 replies; only message in thread
From: Andrew Stellman @ 2026-12-03 21:50 UTC (permalink / raw)
To: David Howells, Marc Dionne
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, linux-afs, netdev, linux-kernel
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-12-03 21:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 21:50 [PATCH net v2] rxrpc: Do not return client slots for service calls Andrew Stellman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox