From nobody Thu Apr 2 19:56:23 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A63BAC6FA82 for ; Wed, 21 Sep 2022 15:57:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232055AbiIUP5a (ORCPT ); Wed, 21 Sep 2022 11:57:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232030AbiIUP4v (ORCPT ); Wed, 21 Sep 2022 11:56:51 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A1A89F8DC; Wed, 21 Sep 2022 08:51:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 555A9B830BE; Wed, 21 Sep 2022 15:50:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97098C433B5; Wed, 21 Sep 2022 15:50:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775426; bh=VFkvvxFCc18O/kmq1Jd3OItHZjzJyz5jqz9K3qY0pVU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QnYaTL4Eplhn3BBhykdATptGi4DHYkGOvDm3xiJSX7O7g6Xa3JcrG07xNSyor3wQG t8nkxisOgFSJzQJ2PlIXNAc0xZlvGOhBzHckjmypk3oK99RaJTiaG+Xm6N6Dzts3IJ IpLGlxHBfqSSoXJCcVkRYkheeeCRKScq1pzGzlgU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Howells , Sasha Levin Subject: [PATCH 5.15 31/45] rxrpc: Fix local destruction being repeated Date: Wed, 21 Sep 2022 17:46:21 +0200 Message-Id: <20220921153647.920686447@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.931277075@linuxfoundation.org> References: <20220921153646.931277075@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: David Howells [ 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 Signed-off-by: Sasha Levin --- 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 ef43fe8bdd2f..1d15940f61d7 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 *w= ork) container_of(work, struct rxrpc_local, processor); bool again; =20 + if (local->dead) + return; + trace_rxrpc_local(local->debug_id, rxrpc_local_processing, atomic_read(&local->usage), NULL); =20 --=20 2.35.1