Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rxrpc: Disable IRQ, not BH, to take the lock for ->attend_link

Use spin_lock_irq(), not spin_lock_bh() to take the lock when accessing the
->attend_link() to stop a delay in the I/O thread due to an interrupt being
taken in the app thread whilst that holds the lock and vice versa.

Fixes: a2ea9a907260 ("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: linux-afs@lists.infradead.org
Link: https://patch.msgid.link/2870146.1734037095@warthog.procyon.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

David Howells and committed by
Jakub Kicinski
d920270a 9495e668

+4 -4
+4 -4
net/rxrpc/io_thread.c
··· 508 508 while ((conn = list_first_entry_or_null(&conn_attend_q, 509 509 struct rxrpc_connection, 510 510 attend_link))) { 511 - spin_lock_bh(&local->lock); 511 + spin_lock_irq(&local->lock); 512 512 list_del_init(&conn->attend_link); 513 - spin_unlock_bh(&local->lock); 513 + spin_unlock_irq(&local->lock); 514 514 rxrpc_input_conn_event(conn, NULL); 515 515 rxrpc_put_connection(conn, rxrpc_conn_put_poke); 516 516 } ··· 527 527 while ((call = list_first_entry_or_null(&call_attend_q, 528 528 struct rxrpc_call, 529 529 attend_link))) { 530 - spin_lock_bh(&local->lock); 530 + spin_lock_irq(&local->lock); 531 531 list_del_init(&call->attend_link); 532 - spin_unlock_bh(&local->lock); 532 + spin_unlock_irq(&local->lock); 533 533 trace_rxrpc_call_poked(call); 534 534 rxrpc_input_call_event(call); 535 535 rxrpc_put_call(call, rxrpc_call_put_poke);