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 DC2B22E3AE5; Tue, 15 Jul 2025 13:47:01 +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=1752587222; cv=none; b=Jo257znDl6eebybckpgAVz6Gk9hmNz3BMYaLeO/+THjtAP9BxR4LRZMZvj/OMT0QEVIvAobsnsBFJUX0iyS/6BVTH+EZpHtvs0x/2fxp0DY0tFFCuUPm4isww9rii93Uma0Yt+pRDX8pooWBbbc8ECGLPjUKoZA2Z1EUv6inwL8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752587222; c=relaxed/simple; bh=FyqZqMqzrdIfMw5u2X/BdcCcA3GICGHy3JHLNNLsmYI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rhgC9mUBh1PuXFFGRgjSrco82w6/NqQoopCEiFB1DlbpSU5p/fQLENsQPAWYfoX3kndJLSBUIMTc06oyxnNca1ChKaqezr5O8tM0YiT63Ry5Tuc8Tz/DWce6MnPL0jzRn7sY/QP8Dtfzl6rpXgsr9TF7yeTpSsJNRfKdtBwgUHE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=c5MdYrDR; 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="c5MdYrDR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21AC0C4CEE3; Tue, 15 Jul 2025 13:47:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1752587221; bh=FyqZqMqzrdIfMw5u2X/BdcCcA3GICGHy3JHLNNLsmYI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c5MdYrDRlvz4l6FEllu/OPxIRGWVp8WESXZNf5zpKuclC8dhF3zsbqDSzvOfRhIlM LbheZuSxhjOeyNTv5mYVmLZf+vWLUBpzSkASR9Yzzpxweks/2IVCfWaFNY1KxjFYng 5IjKG6Mpm7y9RRP9OGI/swTJGYbSHlYl4kZvJQRs= 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 6.1 20/88] rxrpc: Fix oops due to non-existence of prealloc backlog struct Date: Tue, 15 Jul 2025 15:13:56 +0200 Message-ID: <20250715130755.324477686@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250715130754.497128560@linuxfoundation.org> References: <20250715130754.497128560@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 6.1-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;