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 C58A1382F01; Thu, 30 Jul 2026 15:50:27 +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=1785426628; cv=none; b=FnWozApmJXYK6UxTYZDt/tgSFIdyvA25oK8UaC2vbYGEqFdVkeuNpysa0aTKHnJWTUbXud0CURKG4oZRiQW5MmsobxMzeOkoQDTyc4qFCowt7wJqoMj+V22bTyPqbMIcPAi1Zm1mNJmygFtQPsyOjSfa5b+zGO4TM3/ncwdDaPo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785426628; c=relaxed/simple; bh=mKsBweNkNomAaLMt46Ys/Kf3ByTAIpe/GHOviuvyN1k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KgefmS8oGjD3W5bqPd5c/9clo8YKSbreZ2uK8uuqZEUlxogu0OszOiycOfbXNDgpgZ4SgmAshPfJEWl3+ryRoJdGBKt6x6S9hL0KGxrRZ0etUhnBdP1C6keRhBk5p8aNgSRc2mFBHN3cCy6snK9il72ZEprIW0d4iIgDxX55+2E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Hau+ipRP; 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="Hau+ipRP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1C521F000E9; Thu, 30 Jul 2026 15:50:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1785426627; bh=2GwSpiex4viLBtu9muHUjIK8PJbWehwDw+9MaorXhe4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Hau+ipRP75+ENlLa+chCE0fTUBIARRcxVIRxW83xeGkWaoomEk1IQXahaekEhW9RN 7RxRbCIclfghUwA/soF9d8FLO7ikcwuE/nx1TD87BFS3iakMzzP+JRUb8fGlN0C/Pz 2X+1eV0cYrD28w72pnD1B7E+WeCxFaLq9t1/uEJ0= 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.12 487/602] rxrpc: Fix socket notification race Date: Thu, 30 Jul 2026 16:14:39 +0200 Message-ID: <20260730141446.201482744@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260730141435.976815864@linuxfoundation.org> References: <20260730141435.976815864@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.12-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;