Patch "rxrpc: Fix locking issues with the peer record hash" has been added to the 6.12-stable tree

gregkh at linuxfoundation.org gregkh at linuxfoundation.org
Thu Jul 30 06:35:57 PDT 2026


This is a note to let you know that I've just added the patch titled

    rxrpc: Fix locking issues with the peer record hash

to the 6.12-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-locking-issues-with-the-peer-record-hash.patch
and it can be found in the queue-6.12 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 71f5409176f4ffd460689eb5423a20332d00e342 Mon Sep 17 00:00:00 2001
From: David Howells <dhowells at redhat.com>
Date: Tue, 18 Feb 2025 19:22:46 +0000
Subject: rxrpc: Fix locking issues with the peer record hash

From: David Howells <dhowells at redhat.com>

commit 71f5409176f4ffd460689eb5423a20332d00e342 upstream.

rxrpc_new_incoming_peer() can't use spin_lock_bh() whilst its caller has
interrupts disabled.

    WARNING: CPU: 0 PID: 1550 at kernel/softirq.c:369 __local_bh_enable_ip+0x46/0xd0
    ...
    Call Trace:
     rxrpc_alloc_incoming_call+0x1b0/0x400
     rxrpc_new_incoming_call+0x1dd/0x5e0
     rxrpc_input_packet+0x84a/0x920
     rxrpc_io_thread+0x40d/0xb40
     kthread+0x2ec/0x300
     ret_from_fork+0x24/0x40
     ret_from_fork_asm+0x1a/0x30
     </TASK>
    irq event stamp: 1811
    hardirqs last  enabled at (1809): _raw_spin_unlock_irq+0x24/0x50
    hardirqs last disabled at (1810): _raw_read_lock_irq+0x17/0x70
    softirqs last  enabled at (1182): handle_softirqs+0x3ee/0x430
    softirqs last disabled at (1811): rxrpc_new_incoming_peer+0x56/0x120

Fix this by using a plain spin_lock() instead.  IRQs are held, so softirqs
can't happen.

Fixes: a2ea9a907260 ("rxrpc: Use irq-disabling spinlocks between app and I/O thread")
Signed-off-by: David Howells <dhowells at redhat.com>
cc: Marc Dionne <marc.dionne at auristor.com>
cc: Simon Horman <horms at kernel.org>
cc: linux-afs at lists.infradead.org
Link: https://patch.msgid.link/20250218192250.296870-4-dhowells@redhat.com
Signed-off-by: Jakub Kicinski <kuba at kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
 net/rxrpc/peer_object.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/net/rxrpc/peer_object.c
+++ b/net/rxrpc/peer_object.c
@@ -314,10 +314,10 @@ void rxrpc_new_incoming_peer(struct rxrp
 	hash_key = rxrpc_peer_hash_key(local, &peer->srx);
 	rxrpc_init_peer(local, peer, hash_key);
 
-	spin_lock_bh(&rxnet->peer_hash_lock);
+	spin_lock(&rxnet->peer_hash_lock);
 	hash_add_rcu(rxnet->peer_hash, &peer->hash_link, hash_key);
 	list_add_tail(&peer->keepalive_link, &rxnet->peer_keepalive_new);
-	spin_unlock_bh(&rxnet->peer_hash_lock);
+	spin_unlock(&rxnet->peer_hash_lock);
 }
 
 /*


Patches currently in stable-queue which might be from dhowells at redhat.com are

queue-6.12/rxrpc-fix-notification-vs-call-release-vs-recvmsg.patch
queue-6.12/rxrpc-use-irq-disabling-spinlocks-between-app-and-i-o-thread.patch
queue-6.12/afs-fix-delayed-allocation-of-a-cell-s-anonymous-key.patch
queue-6.12/afs-simplify-cell-record-handling.patch
queue-6.12/afs-fix-lack-of-locking-around-modifications-of-net-cells_dyn_ino.patch
queue-6.12/rxrpc-pull-out-certain-app-callback-funcs-into-an-ops-table.patch
queue-6.12/rxrpc-fix-cpu-time-starvation-in-i-o-thread.patch
queue-6.12/afs-fix-dynamic-lookup-to-fail-on-cell-lookup-failure.patch
queue-6.12/afs-handle-cb.initcallbackstate3-requests-without-a-server-record.patch
queue-6.12/rxrpc-disable-irq-not-bh-to-take-the-lock-for-attend_link.patch
queue-6.12/rxrpc-fix-socket-notification-race.patch
queue-6.12/afs-fix-afs_server-ref-accounting.patch
queue-6.12/rxrpc-allow-the-app-to-store-private-data-on-peer-structs.patch
queue-6.12/rxrpc-serialize-kernel-accept-preallocation-with-socket-teardown.patch
queue-6.12/afs-use-the-per-peer-app-data-provided-by-rxrpc.patch
queue-6.12/afs-improve-server-refcount-active-count-tracing.patch
queue-6.12/afs-drop-the-net-parameter-from-afs_unuse_cell.patch
queue-6.12/afs-make-afs_lookup_cell-take-a-trace-note.patch
queue-6.12/rxrpc-don-t-need-barrier-for-tx_bottom-and-acks_hard_ack.patch
queue-6.12/rxrpc-fix-locking-issues-with-the-peer-record-hash.patch
queue-6.12/afs-set-vllist-to-null-if-addr-parsing-fails.patch



More information about the linux-afs mailing list