aboutsummaryrefslogtreecommitdiffstats
path: root/net/rxrpc/local_object.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2022-05-06 23:55:21 +0100
committerDavid Howells <dhowells@redhat.com>2022-09-01 11:44:12 +0100
commitd3d863036d688313f8d566b87acd7d99daf82749 (patch)
treee35e93a6835ffa7decb606a228a30f46557e47f2 /net/rxrpc/local_object.c
parentrxrpc: Fix an insufficiently large sglist in rxkad_verify_packet_2() (diff)
downloadlinux-dev-d3d863036d688313f8d566b87acd7d99daf82749.tar.xz
linux-dev-d3d863036d688313f8d566b87acd7d99daf82749.zip
rxrpc: Fix local destruction being repeated
If the local processor work item for the rxrpc local endpoint gets requeued by an event (such as an incoming packet) between it getting scheduled for destruction and the UDP socket being closed, the rxrpc_local_destroyer() function can get run twice. The second time it can hang because it can end up waiting for cleanup events that will never happen. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to '')
-rw-r--r--net/rxrpc/local_object.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/rxrpc/local_object.c b/net/rxrpc/local_object.c
index 79bb02eb67b2..38ea98ff426b 100644
--- a/net/rxrpc/local_object.c
+++ b/net/rxrpc/local_object.c
@@ -406,6 +406,9 @@ static void rxrpc_local_processor(struct work_struct *work)
container_of(work, struct rxrpc_local, processor);
bool again;
+ if (local->dead)
+ return;
+
trace_rxrpc_local(local->debug_id, rxrpc_local_processing,
refcount_read(&local->ref), NULL);