From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 29B04246781; Thu, 20 Aug 2026 16:42:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787244132; cv=none; b=qV9BOwWhmLbhEMVqDh29Kj0pfTV68ptdyQ9bfOf+OZtmDnRmCNZiUJeAt5aGw0hrRRvbIYlgRXSYL6JElzf7ockpsjEpEvb/OfiT9xSBGTPmuCyLsXs6iy8XcKFHLreVKM95nQ3vfiIg4dPVl/TtFzmEtBvwS1AupBZmXy9wXWU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787244132; c=relaxed/simple; bh=Vl473dKOdp/98iRYDNVff2PL+0iTNtIyjb3ZRZ76vG0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DUHd/eVX/WrDOXsjfcsLdKff6sNnORKlCgg03CQQE7kRGD+YWDlbVF9wcTwgrvdz3lgdMcBFmUWP1idIqPuFXKBXKLgYwjzSVjwCoKe/DFzFe/ahC5dWO1Z0HkyLxZ1gVt4t4aaYWyN0ogVAVnXJmcZASmEIuQoiiSfKaVLrPBw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vBvLhDH6; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="vBvLhDH6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5DB9E1F000E9; Thu, 20 Aug 2026 16:42:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1787244130; bh=1/YSXPagqRnzqHUNqkJS4aiFkMv0X3LW9g3+nJq84O4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=vBvLhDH6tyCNo2u8NwVWdqIc6OfrEl8jYbb7bfmwMLmfddAI+YjxiZNw4CR6aqJuw aCv3F/JCqYYNrFbNmNCAzV9a5qZxhuwebflU4YbrttDt1Xodpa6sM96wsy2RtW7idI s8M+h4z2GsgEjogBMAUCVayyeQbCK6OMoL9j+sJg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, David Howells , Marc Dionne , Jeffrey Altman , Simon Horman , linux-afs@lists.infradead.org, stable@kernel.org, Jakub Kicinski , Sasha Levin Subject: [PATCH 5.10 063/235] rxrpc: Fix socket notification race Date: Thu, 20 Aug 2026 16:54:59 +0200 Message-ID: <20260820145218.359646895@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260820145216.426568665@linuxfoundation.org> References: <20260820145216.426568665@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: David Howells [ Upstream commit e66f8f32f50116670dbbee5bc9e692cd2cd0c8f8 ] There's a race between rxrpc_recvmsg() and rxrpc_notify_socket(), whereby the latter's attempt to avoid disabling interrupts and taking the socket's recvmsg_lock if the call is already queued may happen simultaneously with the former's discarding of a call that has nothing queued. Fix this by removing the shortcut. Note that this only affects userspace's use of AF_RXRPC; the AFS filesystem driver doesn't use the socket queue. Fixes: 248f219cb8bc ("rxrpc: Rewrite the data and ack handling code") Link: https://sashiko.dev/#/patchset/20260616155749.2125907-1-dhowells%40redhat.com Signed-off-by: David Howells cc: Marc Dionne cc: Jeffrey Altman cc: Simon Horman cc: linux-afs@lists.infradead.org cc: stable@kernel.org Link: https://patch.msgid.link/20260624163819.3017002-10-dhowells@redhat.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- net/rxrpc/recvmsg.c | 2 -- 1 file changed, 2 deletions(-) --- a/net/rxrpc/recvmsg.c +++ b/net/rxrpc/recvmsg.c @@ -27,8 +27,6 @@ void rxrpc_notify_socket(struct rxrpc_ca _enter("%d", call->debug_id); - if (!list_empty(&call->recvmsg_link)) - return; if (test_bit(RXRPC_CALL_RELEASED, &call->flags)) { rxrpc_see_call(call); return;