rxrpc: Reduce the use of RCU in packet input
authorDavid Howells <dhowells@redhat.com>
Sat, 8 Oct 2022 13:33:50 +0000 (14:33 +0100)
committerDavid Howells <dhowells@redhat.com>
Thu, 1 Dec 2022 13:36:41 +0000 (13:36 +0000)
commitcd21effb0552d666b2f8609560be764a1a56adbe
treef74ae30d09d037c63db846ef340e0c9651c583a2
parent2d1faf7a0ca3c0b327cf064c80e4e775532c9319
rxrpc: Reduce the use of RCU in packet input

Shrink the region of rxrpc_input_packet() that is covered by the RCU read
lock so that it only covers the connection and call lookup.  This means
that the bits now outside of that can call sleepable functions such as
kmalloc and sendmsg.

Also take a ref on the conn or call we're going to use before we drop the
RCU read lock.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
net/rxrpc/ar-internal.h
net/rxrpc/call_accept.c
net/rxrpc/input.c
net/rxrpc/io_thread.c