linux/net/rxrpc
David Howells fc9de52de3 rxrpc: Fix missing locking causing hanging calls
If a call gets aborted (e.g. because kafs saw a signal) between it being
queued for connection and the I/O thread picking up the call, the abort
will be prioritised over the connection and it will be removed from
local->new_client_calls by rxrpc_disconnect_client_call() without a lock
being held.  This may cause other calls on the list to disappear if a race
occurs.

Fix this by taking the client_call_lock when removing a call from whatever
list its ->wait_link happens to be on.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-afs@lists.infradead.org
Reported-by: Marc Dionne <marc.dionne@auristor.com>
Fixes: 9d35d880e0 ("rxrpc: Move client call connection to the I/O thread")
Link: https://patch.msgid.link/726660.1730898202@warthog.procyon.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-11-07 11:30:34 -08:00
..
af_rxrpc.c net: add sk_wake_async_rcu() helper 2024-03-29 15:03:11 -07:00
ar-internal.h rxrpc: Fix a race between socket set up and I/O thread creation 2024-10-03 16:23:20 -07:00
call_accept.c
call_event.c rxrpc: Extract useful fields from a received ACK to skb priv data 2024-03-05 23:35:26 +00:00
call_object.c rxrpc: Fix congestion control algorithm 2024-05-08 08:05:03 -07:00
call_state.c
conn_client.c rxrpc: Fix missing locking causing hanging calls 2024-11-07 11:30:34 -08:00
conn_event.c rxrpc: Fix the names of the fields in the ACK trailer struct 2024-02-29 15:49:57 +00:00
conn_object.c rxrpc: Clients must accept conn from any address 2024-05-01 14:49:56 -07: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: Only transmit one ACK per jumbo packet received 2024-05-08 08:05:03 -07:00
insecure.c rxrpc: Fix using alignmask being zero for __page_frag_alloc_align() 2024-04-30 18:30:43 -07:00
io_thread.c rxrpc: Fix a race between socket set up and I/O thread creation 2024-10-03 16:23:20 -07:00
Kconfig
key.c
local_event.c rxrpc: Truncate UTS_RELEASE for rxrpc version 2023-05-30 10:01:06 +02:00
local_object.c rxrpc: Fix a race between socket set up and I/O thread creation 2024-10-03 16:23:20 -07:00
Makefile
misc.c rxrpc: Use ktimes for call timeout tracking and set the timer lazily 2024-03-05 23:35:25 +00: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: Record probes after transmission and reduce number of time-gets 2024-03-05 23:35:25 +00:00
peer_event.c
peer_object.c rxrpc, afs: Allow afs to pin rxrpc_peer objects 2023-12-24 15:22:50 +00:00
proc.c rxrpc: Use ktimes for call timeout tracking and set the timer lazily 2024-03-05 23:35:25 +00:00
protocol.h rxrpc: Fix the names of the fields in the ACK trailer struct 2024-02-29 15:49:57 +00:00
recvmsg.c
rtt.c rxrpc: Use ktimes for call timeout tracking and set the timer lazily 2024-03-05 23:35:25 +00:00
rxkad.c rxrpc: Fix using alignmask being zero for __page_frag_alloc_align() 2024-04-30 18:30:43 -07:00
rxperf.c
security.c
sendmsg.c rxrpc: Fix uninitialised variable in rxrpc_send_data() 2024-10-03 16:23:21 -07:00
server_key.c
skbuff.c
sysctl.c net: Remove ctl_table sentinel elements from several networking subsystems 2024-05-03 13:29:42 +01:00
txbuf.c rxrpc: Fix using alignmask being zero for __page_frag_alloc_align() 2024-04-30 18:30:43 -07:00
utils.c