Patch "rxrpc: Fix oops due to non-existence of prealloc backlog struct" has been added to the 5.4-stable tree
gregkh at linuxfoundation.org
gregkh at linuxfoundation.org
Sat Jul 12 06:49:31 PDT 2025
This is a note to let you know that I've just added the patch titled
rxrpc: Fix oops due to non-existence of prealloc backlog struct
to the 5.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
rxrpc-fix-oops-due-to-non-existence-of-prealloc-backlog-struct.patch
and it can be found in the queue-5.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable at vger.kernel.org> know about it.
>From 880a88f318cf1d2a0f4c0a7ff7b07e2062b434a4 Mon Sep 17 00:00:00 2001
From: David Howells <dhowells at redhat.com>
Date: Tue, 8 Jul 2025 22:15:04 +0100
Subject: rxrpc: Fix oops due to non-existence of prealloc backlog struct
From: David Howells <dhowells at redhat.com>
commit 880a88f318cf1d2a0f4c0a7ff7b07e2062b434a4 upstream.
If an AF_RXRPC service socket is opened and bound, but calls are
preallocated, then rxrpc_alloc_incoming_call() will oops because the
rxrpc_backlog struct doesn't get allocated until the first preallocation is
made.
Fix this by returning NULL from rxrpc_alloc_incoming_call() if there is no
backlog struct. This will cause the incoming call to be aborted.
Reported-by: Junvyyang, Tencent Zhuque Lab <zhuque at tencent.com>
Suggested-by: Junvyyang, Tencent Zhuque Lab <zhuque at tencent.com>
Signed-off-by: David Howells <dhowells at redhat.com>
cc: LePremierHomme <kwqcheii at proton.me>
cc: Marc Dionne <marc.dionne at auristor.com>
cc: Willy Tarreau <w at 1wt.eu>
cc: Simon Horman <horms at kernel.org>
cc: linux-afs at lists.infradead.org
Link: https://patch.msgid.link/20250708211506.2699012-3-dhowells@redhat.com
Signed-off-by: Jakub Kicinski <kuba at kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
net/rxrpc/call_accept.c | 3 +++
1 file changed, 3 insertions(+)
--- a/net/rxrpc/call_accept.c
+++ b/net/rxrpc/call_accept.c
@@ -281,6 +281,9 @@ static struct rxrpc_call *rxrpc_alloc_in
unsigned short call_tail, conn_tail, peer_tail;
unsigned short call_count, conn_count;
+ if (!b)
+ return NULL;
+
/* #calls >= #conns >= #peers must hold true. */
call_head = smp_load_acquire(&b->call_backlog_head);
call_tail = b->call_backlog_tail;
Patches currently in stable-queue which might be from dhowells at redhat.com are
queue-5.4/rxrpc-fix-oops-due-to-non-existence-of-prealloc-backlog-struct.patch
More information about the linux-afs
mailing list