From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 154192E7BD8; Tue, 15 Jul 2025 13:28:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752586108; cv=none; b=PtAVJagwuEkoBRfKWeS+AsRrftBn8UMhLxZx/3/XX4jWxo4eHgXKFJrkPfQqJe1tJkEvq1157h6VSgXIGiq9J4iI5txgONFKd/v5Dg5EL6YUQZoPU+GhTFJUPFHY7qcTcPr8sissgfeEr4wUYRxsFFZ1HZbqsW2P/6H/RdAFYSI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752586108; c=relaxed/simple; bh=GRm7+1Ht4lEGa2QuOD3NnmFqiGSQzYy09FRvhT3QX6I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ucfK4rY/WNsrm0Mmws9mA/akcEiBSXAkQDZP8fhdb03n5m4FiCJgdSnBgtvpPjk1i5cCpZ07xTy0tqHWa9Oa0mqiWVZLnvDcPmXrGIOK2hqowW7/KA0MjyRnT4ydn9tTphs0chSy6jGzgmNNYPbvVipeLg0VUByWtP+GL8m0Fmg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Vrou8X7j; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Vrou8X7j" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BD21C4CEE3; Tue, 15 Jul 2025 13:28:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1752586107; bh=GRm7+1Ht4lEGa2QuOD3NnmFqiGSQzYy09FRvhT3QX6I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vrou8X7jphksJwCSpUXM4UgHmr/VYPZbz8JHsbgTlQwpbgNTYzxmKUTNA06VYkh0f hHvzYc22LNDic852uHNkBLuMHgCVDfFGX8zEjVOMzrHveKAHnOh/qJpb5KGHmHwdLo F7j/rmIsPRj7J6Sa9MbmRKulHxHHdVoroZnlcIGI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Junvyyang, Tencent Zhuque Lab" , David Howells , LePremierHomme , Marc Dionne , Willy Tarreau , Simon Horman , linux-afs@lists.infradead.org, Jakub Kicinski Subject: [PATCH 5.15 19/77] rxrpc: Fix oops due to non-existence of prealloc backlog struct Date: Tue, 15 Jul 2025 15:13:18 +0200 Message-ID: <20250715130752.469960378@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250715130751.668489382@linuxfoundation.org> References: <20250715130751.668489382@linuxfoundation.org> User-Agent: quilt/0.68 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.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: David Howells commit 880a88f318cf1d2a0f4c0a7ff7b07e2062b434a4 upstream. If an AF_RXRPC service socket is opened and bound, but calls are preallocated, then rxrpc_alloc_incoming_call() will oops because the rxrpc_backlog struct doesn't get allocated until the first preallocation is made. Fix this by returning NULL from rxrpc_alloc_incoming_call() if there is no backlog struct. This will cause the incoming call to be aborted. Reported-by: Junvyyang, Tencent Zhuque Lab Suggested-by: Junvyyang, Tencent Zhuque Lab Signed-off-by: David Howells cc: LePremierHomme cc: Marc Dionne cc: Willy Tarreau cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250708211506.2699012-3-dhowells@redhat.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/rxrpc/call_accept.c | 3 +++ 1 file changed, 3 insertions(+) --- a/net/rxrpc/call_accept.c +++ b/net/rxrpc/call_accept.c @@ -270,6 +270,9 @@ static struct rxrpc_call *rxrpc_alloc_in unsigned short call_tail, conn_tail, peer_tail; unsigned short call_count, conn_count; + if (!b) + return NULL; + /* #calls >= #conns >= #peers must hold true. */ call_head = smp_load_acquire(&b->call_backlog_head); call_tail = b->call_backlog_tail;