1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/net/rxrpc
David Howells 71f5409176 rxrpc: Fix locking issues with the peer record hash
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: a2ea9a9072 ("rxrpc: Use irq-disabling spinlocks between app and I/O thread")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
Link: https://patch.msgid.link/20250218192250.296870-4-dhowells@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-02-21 15:06:29 -08:00
..
af_rxrpc.c rxrpc: Use irq-disabling spinlocks between app and I/O thread 2024-12-09 13:48:31 -08:00
ar-internal.h rxrpc: peer->mtu_lock is redundant 2025-02-21 15:06:29 -08:00
call_accept.c rxrpc: Use irq-disabling spinlocks between app and I/O thread 2024-12-09 13:48:31 -08:00
call_event.c rxrpc: Implement RACK/TLP to deal with transmission stalls [RFC8985] 2024-12-09 13:48:33 -08:00
call_object.c rxrpc: Fix call state set to not include the SERVER_SECURING state 2025-02-05 18:47:46 -08:00
call_state.c rxrpc: Move client call connection to the I/O thread 2023-01-06 09:43:33 +00:00
conn_client.c rxrpc: Use irq-disabling spinlocks between app and I/O thread 2024-12-09 13:48:31 -08:00
conn_event.c rxrpc: Fix call state set to not include the SERVER_SECURING state 2025-02-05 18:47:46 -08:00
conn_object.c rxrpc: Fix the rxrpc_connection attend queue handling 2025-02-04 15:30:28 +01:00
conn_service.c rxrpc_find_service_conn_rcu: fix the usage of read_seqbegin_or_lock() 2023-12-24 15:22:49 +00:00
input.c rxrpc: peer->mtu_lock is redundant 2025-02-21 15:06:29 -08:00
input_rack.c rxrpc: Implement RACK/TLP to deal with transmission stalls [RFC8985] 2024-12-09 13:48:33 -08:00
insecure.c rxrpc: Prepare to be able to send jumbo DATA packets 2024-12-09 13:48:26 -08:00
io_thread.c rxrpc: Disable IRQ, not BH, to take the lock for ->attend_link 2024-12-16 18:06:23 -08:00
Kconfig rxrpc: Allow a delay to be injected into packet reception 2023-01-31 16:38:09 +00:00
key.c rxrpc: Fix error when reading rxrpc tokens 2023-04-23 13:38:28 +01:00
local_event.c rxrpc: Truncate UTS_RELEASE for rxrpc version 2023-05-30 10:01:06 +02:00
local_object.c rxrpc: Don't use received skbuff timestamps 2024-12-09 13:48:29 -08:00
Makefile rxrpc: Implement RACK/TLP to deal with transmission stalls [RFC8985] 2024-12-09 13:48:33 -08:00
misc.c rxrpc: Implement path-MTU probing using padded PING ACKs (RFC8899) 2024-12-09 13:48:25 -08:00
net_ns.c rxrpc: Create a procfile to display outstanding client conn bundles 2023-12-24 15:22:56 +00:00
output.c rxrpc: Fix alteration of headers whilst zerocopy pending 2025-02-11 16:53:41 -08:00
peer_event.c rxrpc: peer->mtu_lock is redundant 2025-02-21 15:06:29 -08:00
peer_object.c rxrpc: Fix locking issues with the peer record hash 2025-02-21 15:06:29 -08:00
proc.c rxrpc: Manage RTT per-call rather than per-peer 2024-12-09 13:48:32 -08:00
protocol.h rxrpc: Implement path-MTU probing using padded PING ACKs (RFC8899) 2024-12-09 13:48:25 -08:00
recvmsg.c rxrpc: Use irq-disabling spinlocks between app and I/O thread 2024-12-09 13:48:31 -08:00
rtt.c rxrpc: Manage RTT per-call rather than per-peer 2024-12-09 13:48:32 -08:00
rxkad.c rxrpc: Fix alteration of headers whilst zerocopy pending 2025-02-11 16:53:41 -08:00
rxperf.c rxrpc: rxperf: Fix missing decoding of terminal magic cookie 2025-02-21 15:06:29 -08:00
security.c rxrpc: Use irq-disabling spinlocks between app and I/O thread 2024-12-09 13:48:31 -08:00
sendmsg.c rxrpc: Fix alteration of headers whilst zerocopy pending 2025-02-11 16:53:41 -08:00
server_key.c rxrpc: Implement an in-kernel rxperf server for testing purposes 2022-12-01 13:36:37 +00:00
skbuff.c rxrpc: Use consume_skb() rather than kfree_skb_reason() 2023-02-07 23:11:20 +00:00
sysctl.c rxrpc: Implement path-MTU probing using padded PING ACKs (RFC8899) 2024-12-09 13:48:25 -08:00
txbuf.c rxrpc: Fix alteration of headers whilst zerocopy pending 2025-02-11 16:53:41 -08:00
utils.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36 2019-05-24 17:27:11 +02:00