Commit d3d86303 authored by David Howells's avatar David Howells

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: default avatarDavid Howells <dhowells@redhat.com>
parent 0d40f728
...@@ -406,6 +406,9 @@ static void rxrpc_local_processor(struct work_struct *work) ...@@ -406,6 +406,9 @@ static void rxrpc_local_processor(struct work_struct *work)
container_of(work, struct rxrpc_local, processor); container_of(work, struct rxrpc_local, processor);
bool again; bool again;
if (local->dead)
return;
trace_rxrpc_local(local->debug_id, rxrpc_local_processing, trace_rxrpc_local(local->debug_id, rxrpc_local_processing,
refcount_read(&local->ref), NULL); refcount_read(&local->ref), NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment