lkml.org 
[lkml]   [2022]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.4 018/120] rxrpc: Fix local destruction being repeated
    Date
    From: David Howells <dhowells@redhat.com>

    [ Upstream commit d3d863036d688313f8d566b87acd7d99daf82749 ]

    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>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    net/rxrpc/local_object.c | 3 +++
    1 file changed, 3 insertions(+)

    diff --git a/net/rxrpc/local_object.c b/net/rxrpc/local_object.c
    index 01135e54d95d..fc784fcc3a94 100644
    --- a/net/rxrpc/local_object.c
    +++ b/net/rxrpc/local_object.c
    @@ -448,6 +448,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,
    atomic_read(&local->usage), NULL);

    --
    2.35.1


    \
     
     \ /
      Last update: 2022-09-26 12:37    [W:3.765 / U:0.656 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site