From: netdev-bot+sashiko@kernel.org
To: bugs@stellman-greene.com
Cc: dhowells@redhat.com, marc.dionne@auristor.com,
davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org,
linux-afs@lists.infradead.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] rxrpc: Do not return client slots for service calls
Date: Thu, 03 Dec 2026 18:14:55 +0000 [thread overview]
Message-ID: <179632169515.3146.8139316852801630735@kernel.org> (raw)
In-Reply-To: <20261202181321.74079-1-bugs@stellman-greene.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] The commit message describes a much narrower bug than the one
the code fixes.
--
rxrpc: Do not return client slots for service calls
With this commit, rxrpc_put_call_slot() returns early for calls that have
RXRPC_CALL_IS_SERVICE set. Releasing a service call then no longer calls
up() on the client call limiter. Only client calls take a slot, in
rxrpc_new_client_call().
> 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.
[Severity: Medium]
Is this description narrower than what the code change actually fixes?
The only caller of rxrpc_put_call_slot() is rxrpc_release_call(). Every
service call reaches it when released, not just the precharged calls
discarded at socket close.
A userspace service call that completes normally is released in
rxrpc_recvmsg():
net/rxrpc/recvmsg.c:rxrpc_recvmsg() {
...
if (!(flags & MSG_PEEK))
rxrpc_release_call(rx, call);
...
}
In-kernel service calls (AFS cache manager, rxperf) are released in
rxrpc_kernel_shutdown_call():
net/rxrpc/af_rxrpc.c:rxrpc_kernel_shutdown_call() {
...
if (!test_bit(RXRPC_CALL_RELEASED, &call->flags)) {
rxrpc_release_call(rxrpc_sk(sock->sk), call);
...
}
rxrpc_service_prealloc_one() creates service calls with only
RXRPC_CALL_IS_SERVICE set. RXRPC_CALL_KERNEL is set only in
rxrpc_alloc_client_call().
So before this patch, kernel service calls also did
up(&rxrpc_call_limiter) on the userspace limiter, not
rxrpc_kernel_call_limiter.
If so, every incoming call served by any rxrpc service added a permanent
slot to the global userspace client call limiter. A remote peer could then
wear down the 1000 call cap just by making calls.
Could the commit message mention the normal completion paths? It could
also note that remote traffic can trigger this, and that kernel service
calls raised the userspace limiter.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261202181321.74079-1-bugs%40stellman-greene.com
prev parent reply other threads:[~2026-12-03 18:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 18:13 [PATCH net] rxrpc: Do not return client slots for service calls Andrew Stellman
2026-12-03 18:14 ` netdev-bot+sashiko [this message]
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=179632169515.3146.8139316852801630735@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=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