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 62C5A271A94; Mon, 13 Apr 2026 16:06:15 +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=1776096375; cv=none; b=DhASaBWHvLx+xQsTq1xivPPIoCaLcNqJB1epdEm0Bbx8XOrmEDNbsbH3qBpW7KGRvy3LXOTeVAVZ3v/VSLbPRUnH7lXM35V+QSBeKwOAKtspj6VnQvGV6Hhqu0xZx+8i+ahq4QB95QXho8GCF7MzB8xk5zu0qrbljqizvckS3vM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776096375; c=relaxed/simple; bh=rlooFV7JQkUbuQrkrTX1nfxUtMkbltdWxaXB0Rr5gDU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qnE7EOepXbmV/G0UWvrg7UxNacP57Xv97g0KpL2QqzmEBDi807r8VM7R7vVDVaZ2ylZAqpPUPg1Y8B+H1QYyMkA3ZGY1+s3wPQRj/7G13FAze22h2yREvP8Ku4lLmijwHS8ecC1Q5fktHpLmtfubygVzVDP2S6tbZly9QkBijCU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yaPzS30A; 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="yaPzS30A" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88697C2BCAF; Mon, 13 Apr 2026 16:06:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1776096375; bh=rlooFV7JQkUbuQrkrTX1nfxUtMkbltdWxaXB0Rr5gDU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yaPzS30AeBQhb4pzrJmPlalPF7o2SiTbMLoiUt0jc9FbX6TaXqY82Qj3pcWgksiDX kWezqNAjmNp4PApMQAn5DzM5sHw02Eq3QLDScjb8XbXApjor7/AytrDVyy8iWQ+dTP 13fG7Y5ihmzgmWCkNFo3kfHyKKHyxgFLIt1xqY8o= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yifan Wu , Juefei Pu , Douya Le , Yuan Tan , Xin Liu , Ao Zhou , David Howells , Marc Dionne , Simon Horman , linux-afs@lists.infradead.org, stable@kernel.org, Jakub Kicinski Subject: [PATCH 6.19 74/86] rxrpc: Only put the call ref if one was acquired Date: Mon, 13 Apr 2026 18:00:21 +0200 Message-ID: <20260413155734.307048666@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260413155731.568515178@linuxfoundation.org> References: <20260413155731.568515178@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.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Douya Le commit 6331f1b24a3e85465f6454e003a3e6c22005a5c5 upstream. rxrpc_input_packet_on_conn() can process a to-client packet after the current client call on the channel has already been torn down. In that case chan->call is NULL, rxrpc_try_get_call() returns NULL and there is no reference to drop. The client-side implicit-end error path does not account for that and unconditionally calls rxrpc_put_call(). This turns a protocol error path into a kernel crash instead of rejecting the packet. Only drop the call reference if one was actually acquired. Keep the existing protocol error handling unchanged. Fixes: 5e6ef4f1017c ("rxrpc: Make the I/O thread take over the call and local processor work") Reported-by: Yifan Wu Reported-by: Juefei Pu Signed-off-by: Douya Le Co-developed-by: Yuan Tan Signed-off-by: Yuan Tan Suggested-by: Xin Liu Signed-off-by: Ao Zhou Signed-off-by: David Howells cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org cc: stable@kernel.org Link: https://patch.msgid.link/20260408121252.2249051-11-dhowells@redhat.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/rxrpc/io_thread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/net/rxrpc/io_thread.c +++ b/net/rxrpc/io_thread.c @@ -419,7 +419,8 @@ static int rxrpc_input_packet_on_conn(st if (sp->hdr.callNumber > chan->call_id) { if (rxrpc_to_client(sp)) { - rxrpc_put_call(call, rxrpc_call_put_input); + if (call) + rxrpc_put_call(call, rxrpc_call_put_input); return rxrpc_protocol_error(skb, rxrpc_eproto_unexpected_implicit_end); }