]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
rxrpc: Fix potential infinite loop in rxrpc_recvmsg()
authorDavid Howells <dhowells@redhat.com>
Wed, 24 Jun 2026 16:38:15 +0000 (17:38 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 25 Jun 2026 17:07:18 +0000 (10:07 -0700)
Fix the wait in rxrpc_recvmsg() also take check the oob queue.

Fixes: 5800b1cf3fd8 ("rxrpc: Allow CHALLENGEs to the passed to the app for a RESPONSE")
Link: https://sashiko.dev/#/patchset/20260616155749.2125907-1-dhowells%40redhat.com
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Jeffrey Altman <jaltman@auristor.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: stable@kernel.org
Link: https://patch.msgid.link/20260624163819.3017002-9-dhowells@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/rxrpc/recvmsg.c

index 39a03684432d9d55120df18938632469e3e363da..f382a47c6eb064a1f76e797d1464379fe187756f 100644 (file)
@@ -438,7 +438,8 @@ try_again:
                return -EAGAIN;
        }
 
-       if (list_empty(&rx->recvmsg_q)) {
+       if (list_empty(&rx->recvmsg_q) &&
+           skb_queue_empty_lockless(&rx->recvmsg_oobq)) {
                ret = -EWOULDBLOCK;
                if (timeo == 0) {
                        call = NULL;