From nobody Thu Apr 2 19:58:01 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 5B8AFECAAD8 for ; Wed, 21 Sep 2022 16:19:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231267AbiIUQTC (ORCPT ); Wed, 21 Sep 2022 12:19:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232280AbiIUQSb (ORCPT ); Wed, 21 Sep 2022 12:18:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 694B5AB427; Wed, 21 Sep 2022 09:03:15 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 96D8462C89; Wed, 21 Sep 2022 15:52:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97338C433C1; Wed, 21 Sep 2022 15:52:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775524; bh=fkYpudiHPscLgnit5w4FUkSx8lrTbPqaBC1zpSxdbZo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pMPrLX4L3DFJYoDmTVPTsccj9SVoh7w2e1o78PfZMESPlnXjWJgkP3SN2NnQcuYZt pH5SfzfyhmfddUKrd1Gkh+iPS7aQ+EoW11vxoVo/+xpbBpFcP2FpEJHwAhCXAYINK2 NG3p5XD+Iaebr/t+PbEWJx+wxXlJ4Qn3GncnQR0s= 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.10 28/39] rxrpc: Fix local destruction being repeated Date: Wed, 21 Sep 2022 17:46:33 +0200 Message-Id: <20220921153646.653432137@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153645.663680057@linuxfoundation.org> References: <20220921153645.663680057@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 8c2881054266..ebbf1b03b62c 100644 --- a/net/rxrpc/local_object.c +++ b/net/rxrpc/local_object.c @@ -424,6 +424,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