All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: David Howells <dhowells@redhat.com>,
	Sasha Levin <sashal@kernel.org>,
	marc.dionne@auristor.com, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	linux-afs@lists.infradead.org, netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 5.19 08/22] rxrpc: Fix local destruction being repeated
Date: Wed, 14 Sep 2022 05:00:49 -0400	[thread overview]
Message-ID: <20220914090103.470630-8-sashal@kernel.org> (raw)
In-Reply-To: <20220914090103.470630-1-sashal@kernel.org>

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 96ecb7356c0fe..790c270c06785 100644
--- a/net/rxrpc/local_object.c
+++ b/net/rxrpc/local_object.c
@@ -405,6 +405,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);
 
-- 
2.35.1


  parent reply	other threads:[~2022-09-14  9:02 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14  9:00 [PATCH AUTOSEL 5.19 01/22] arm64: dts: juno: Add missing MHU secure-irq Sasha Levin
2022-09-14  9:00 ` Sasha Levin
2022-09-14  9:00 ` [PATCH AUTOSEL 5.19 02/22] spi: cadence-quadspi: Disable irqs during indirect reads Sasha Levin
2022-09-14  9:00 ` [PATCH AUTOSEL 5.19 03/22] ASoC: nau8824: Fix semaphore unbalance at error paths Sasha Levin
2022-09-14  9:00   ` Sasha Levin
2022-09-14  9:00 ` [PATCH AUTOSEL 5.19 04/22] regulator: pfuze100: Fix the global-out-of-bounds access in pfuze100_regulator_probe() Sasha Levin
2022-09-14  9:00 ` [PATCH AUTOSEL 5.19 05/22] ASoC: fsl_aud2htx: register platform component before registering cpu dai Sasha Levin
2022-09-14  9:00   ` Sasha Levin
2022-09-14  9:00   ` Sasha Levin
2022-09-14  9:00 ` [PATCH AUTOSEL 5.19 06/22] ASoC: fsl_aud2htx: Add error handler for pm_runtime_enable Sasha Levin
2022-09-14  9:00   ` Sasha Levin
2022-09-14  9:00   ` Sasha Levin
2022-09-14  9:00 ` [PATCH AUTOSEL 5.19 07/22] scsi: lpfc: Return DID_TRANSPORT_DISRUPTED instead of DID_REQUEUE Sasha Levin
2022-09-14  9:00 ` Sasha Levin [this message]
2022-09-14  9:00 ` [PATCH AUTOSEL 5.19 09/22] rxrpc: Fix calc of resend age Sasha Levin
2022-09-14  9:00 ` [PATCH AUTOSEL 5.19 10/22] wifi: mac80211_hwsim: check length for virtio packets Sasha Levin
2022-09-14  9:00 ` [PATCH AUTOSEL 5.19 11/22] ALSA: hda/sigmatel: Keep power up while beep is enabled Sasha Levin
2022-09-14  9:00   ` Sasha Levin
2022-09-14  9:00 ` [PATCH AUTOSEL 5.19 12/22] erofs: avoid the potentially wrong m_plen for big pcluster Sasha Levin
2022-09-14  9:00   ` Sasha Levin
2022-09-14  9:00 ` [PATCH AUTOSEL 5.19 13/22] ALSA: hda/tegra: Align BDL entry to 4KB boundary Sasha Levin
2022-09-14  9:00   ` Sasha Levin
2022-09-14  9:00 ` [PATCH AUTOSEL 5.19 14/22] ALSA: usb-audio: Fix an out-of-bounds bug in __snd_usb_parse_audio_interface() Sasha Levin
2022-09-14  9:00   ` Sasha Levin
2022-09-14  9:00 ` [PATCH AUTOSEL 5.19 15/22] drm/ttm: update bulk move object of ghost BO Sasha Levin
2022-09-14  9:00   ` Sasha Levin
2022-09-14  9:00 ` [PATCH AUTOSEL 5.19 16/22] net: usb: qmi_wwan: add Quectel RM520N Sasha Levin
2022-09-14  9:00 ` [PATCH AUTOSEL 5.19 17/22] afs: Return -EAGAIN, not -EREMOTEIO, when a file already locked Sasha Levin
2022-09-14  9:00 ` [PATCH AUTOSEL 5.19 18/22] scsi: mpt3sas: Fix use-after-free warning Sasha Levin
2022-09-14  9:01 ` [PATCH AUTOSEL 5.19 19/22] MIPS: OCTEON: irq: Fix octeon_irq_force_ciu_mapping() Sasha Levin
2022-09-14  9:01 ` [PATCH AUTOSEL 5.19 20/22] drm/amdgpu: prevent toc firmware memory leak Sasha Levin
2022-09-14  9:01   ` Sasha Levin
2022-09-14  9:01   ` Sasha Levin
2022-09-14  9:01 ` [PATCH AUTOSEL 5.19 21/22] drm/panfrost: devfreq: set opp to the recommended one to configure regulator Sasha Levin
2022-09-14  9:01   ` Sasha Levin
2022-09-14  9:01 ` [PATCH AUTOSEL 5.19 22/22] mksysmap: Fix the mismatch of 'L0' symbols in System.map Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220914090103.470630-8-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.dionne@auristor.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.