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 83DF943E4BA; Thu, 30 Jul 2026 16:14:16 +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=1785428057; cv=none; b=lK25i/sO1SiZVGVkqeICgyds0Dm9nBdnOEs2PNyfqDKrQij/g12NVZ2ItVzyWza+GJOWR21Q5wOxkwLfrDNG9XyW9Ay8rGb8JQ52lpPxEXHEYGbvO76qWE6nqtvE4WlvcMnqEfH00ccbQON3WqR/cx5BWV66T7suvvh/mWDCD+E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785428057; c=relaxed/simple; bh=30/n7fdTM/T5G3EwW+c94lov7Xn85TAndih5BQaaYFM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TxzGHgeEN3ofJBfBOW7cG1tUuwOBCT8TO1LpcMTaSCUGcgmtuIoffWMlOXGbUFBWpTcIfXxUyxdbSSxihwI9LrWA8521fXpEzr+53a4X1TkEF7HFIBENRZOnRDricHCF0S8R1VqFYI4UuJwX59kbd2hvbj/c39OTiABDTQ+oAX4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=X57f1KwB; 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="X57f1KwB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE8C41F00A3A; Thu, 30 Jul 2026 16:14:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1785428056; bh=np1G88R9N7WmdXANHNvAoSyX3/bAYJbzD8hUprfHHNw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=X57f1KwBzG58vGUtdntH3EqgslEayCotEW7fHUBsSm5REyAtWDHNFveqRHeA/Fv6y WgQMnE1ewVwiX8TDpQGSwV3Af7BZRwCTuYUTrMDL28j4Q9AH9YYoLXzTnWVs6mz/Vw 22unn6VcvTQCXScnp7lbrr9MFtdoWNgEEZbxexg0= 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 6.6 388/484] rxrpc: Fix socket notification race Date: Thu, 30 Jul 2026 16:14:45 +0200 Message-ID: <20260730141431.904486204@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260730141423.392222816@linuxfoundation.org> References: <20260730141423.392222816@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 6.6-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, rxrpc_call_see_notify_released); return;