From: David Howells Date: Fri, 6 May 2022 22:55:21 +0000 (+0100) Subject: rxrpc: Fix local destruction being repeated X-Git-Tag: v6.6.17~6656^2~23^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d3d863036d688313f8d566b87acd7d99daf82749;p=platform%2Fkernel%2Flinux-rpi.git 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 --- diff --git a/net/rxrpc/local_object.c b/net/rxrpc/local_object.c index 79bb02e..38ea98f 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);