From: Andrew Stellman <bugs@stellman-greene.com>
To: David Howells <dhowells@redhat.com>,
Marc Dionne <marc.dionne@auristor.com>
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
Subject: [PATCH net] rxrpc: Do not return client slots for service calls
Date: Wed, 2 Dec 2026 13:13:21 -0500 [thread overview]
Message-ID: <20261202181321.74079-1-bugs@stellman-greene.com> (raw)
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(). Closing a socket on which a userspace service
has precharged calls with RXRPC_CHARGE_ACCEPT releases those service
calls and raises the limiter's count above 1000.
Skip the limiter release for service calls. Service calls no longer
change the limiter count.
Fixes: b7a7d6740803 ("rxrpc: Impose a maximum number of client calls")
Signed-off-by: Andrew Stellman <astellman@stellman-greene.com>
---
Tested on mainline 19cc08c1a6a6 in arm64 QEMU with KASAN, with
test-only logging of the limiter count: 1000 to 1003 before the fix,
1000 after.
Found with Quality Playbook
(https://github.com/andrewstellman/quality-playbook) running Claude
Opus 5.5; the fix was drafted with OpenAI GPT-6 (Codex).
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
next reply other threads:[~2026-12-02 18:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 18:13 Andrew Stellman [this message]
2026-12-03 18:14 ` [PATCH net] rxrpc: Do not return client slots for service calls netdev-bot+sashiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261202181321.74079-1-bugs@stellman-greene.com \
--to=bugs@stellman-greene.com \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-afs@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.dionne@auristor.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox