From: Simon Horman <horms@kernel.org>
To: David Howells <dhowells@redhat.com>
Cc: netdev@vger.kernel.org, Faith <faith@zellic.io>,
Pumpkin Chang <pumpkin@devco.re>,
Marc Dionne <marc.dionne@auristor.com>, Nir Ohfeld <niro@wiz.io>,
Willy Tarreau <w@1wt.eu>, Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-afs@lists.infradead.org, security@kernel.org,
stable@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2] rxrpc: Fix recvmsg() unconditional requeue
Date: Mon, 19 Jan 2026 15:10:14 +0000 [thread overview]
Message-ID: <aW5JVspgbtaAHl-v@horms.kernel.org> (raw)
In-Reply-To: <95163.1768428203@warthog.procyon.org.uk>
On Wed, Jan 14, 2026 at 10:03:23PM +0000, David Howells wrote:
...
> diff --git a/net/rxrpc/recvmsg.c b/net/rxrpc/recvmsg.c
...
> @@ -549,11 +550,21 @@ int rxrpc_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
> error_requeue_call:
> if (!(flags & MSG_PEEK)) {
> spin_lock_irq(&rx->recvmsg_lock);
> - list_add(&call->recvmsg_link, &rx->recvmsg_q);
> - spin_unlock_irq(&rx->recvmsg_lock);
> - trace_rxrpc_recvmsg(call_debug_id, rxrpc_recvmsg_requeue, 0);
> + if (list_empty(&call->recvmsg_link)) {
> + list_add(&call->recvmsg_link, &rx->recvmsg_q);
> + rxrpc_see_call(call, rxrpc_call_see_recvmsg_requeue);
> + spin_unlock_irq(&rx->recvmsg_lock);
> + } else if (list_is_first(&call->recvmsg_link, &rx->recvmsg_q)) {
> + spin_unlock_irq(&rx->recvmsg_lock);
> + rxrpc_put_call(call, rxrpc_call_see_recvmsg_requeue_first);
> + } else {
> + list_move(&call->recvmsg_link, &rx->recvmsg_q);
> + spin_unlock_irq(&rx->recvmsg_lock);
> + rxrpc_put_call(call, rxrpc_call_see_recvmsg_requeue_move);
> + }
> + trace_rxrpc_recvmsg(call_debug_id, rxrpc_recvmsg_requeue, 0);
Hi David,
If you need to re-spin for some other reason then please
fix the line above so only tabs are used for indentation
(a leading space seems to have sneaked in somehow).
> } else {
> - rxrpc_put_call(call, rxrpc_call_put_recvmsg);
> + rxrpc_put_call(call, rxrpc_call_put_recvmsg_peek_nowait);
> }
> error_no_call:
> release_sock(&rx->sk);
>
next prev parent reply other threads:[~2026-01-19 15:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-14 22:03 [PATCH net v2] rxrpc: Fix recvmsg() unconditional requeue David Howells
2026-01-19 15:10 ` Simon Horman [this message]
2026-01-19 18:05 ` Jakub Kicinski
2026-01-19 18:07 ` Jakub Kicinski
2026-01-19 18:10 ` patchwork-bot+netdevbpf
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=aW5JVspgbtaAHl-v@horms.kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=edumazet@google.com \
--cc=faith@zellic.io \
--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=niro@wiz.io \
--cc=pabeni@redhat.com \
--cc=pumpkin@devco.re \
--cc=security@kernel.org \
--cc=stable@kernel.org \
--cc=w@1wt.eu \
/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