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 215BB24EA90; Mon, 13 Apr 2026 16:13:10 +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=1776096790; cv=none; b=A8JnXxHh3QSaxjeZuBoiId02ccWFBRfJso7qALawexnT+fhKjbPwCboWpfsGZzF4lqv51uQHXWv9r1VtnbU9fODP1UtN2O22nChf7kz9KUEs+hNyefeW6u/STuXTw4+vTP9YI7Cn8SS/03g+01xUsTEmsekuVHoDmoh2Xzqtr9A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776096790; c=relaxed/simple; bh=IncVa67EiUFF2Kx3AW+w0XxNXFgqNBjMp1tHk/FniXQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sikSh7ZzEuPhVHpFZdp4ohU8hJ+dvde4bHQD1oo0BmV4KtD/cl2jxefyxVgW3MyGnQE/8vV25cfI9b+6Le0ygt0dd/694sCxW9bzWTXuo7Lrxwms0q+bdWAoIB4WU/d1cwWikoBylXydWB2aIb/0G6Sb2SXaQ3XGsOaZTkGYeFg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Q+6sBxiP; 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="Q+6sBxiP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 840E9C2BCAF; Mon, 13 Apr 2026 16:13:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1776096790; bh=IncVa67EiUFF2Kx3AW+w0XxNXFgqNBjMp1tHk/FniXQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q+6sBxiP7SPpqNc4O37QPw3eX6d8a7bkr3LZzKt8KqFgcRKjfpXSMN0esogJs6/r1 PzsEZnLRvSf4N7QvoRAHG5xoYZwaYOpAOLQj88nveJLA5vBlqjXrtG0tu2wx6xaMbe nlwnJmyqdxDGHnhIb+Q7htkz0HyM5LMkeMhn5tgI= 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.12 64/70] rxrpc: Only put the call ref if one was acquired Date: Mon, 13 Apr 2026 18:00:59 +0200 Message-ID: <20260413155730.567437748@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260413155728.181580293@linuxfoundation.org> References: <20260413155728.181580293@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: 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 @@ -400,7 +400,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); }