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 5F6E73AAF5A; Mon, 17 Aug 2026 13:46:32 +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=1786974397; cv=none; b=EiYzcnA3JEfKd6l6ChzmZ1q2lsRTsJiurrbWK6vMbk5D+Y5oCAZ6h7fSg7wqhjQ1QLTXIHbp7ZAstS2h/EORh1qG2ABHiyMFm09ui/IA5x460HgSsYOG9P8fVpAZSvD+j09kYqJ1gSj8mHmWFCR6oJbwnYLQ6FjjVTmnThet+HA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786974397; c=relaxed/simple; bh=eErwS8gGv2o9qhG2sNwY/yugH4LWTr/h02w5W7lEi7g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lh48obEb3YhX1S2fv2Fq8VPZdL37TwT65DFVuYkwDYhew9+jgrGSj29pkZlJbtX9M5hSMnSCPXrc7wlu8jKgr86zVa236DA7Kc0ApCzyOwyfumGUxCWidhyL62O2gFlJ2/moEMgrUsW8NQMUe94oz0qLWHpCTj/eeEXiGhBsX/c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=R4Y9tUq1; 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="R4Y9tUq1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94DFE1F00A3A; Mon, 17 Aug 2026 13:46:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786974391; bh=0EYysFYSkyU6OxDUk+7zXe30CPmK28TaBGnoXbjF3eU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=R4Y9tUq12UFQGZom6F368C3ILjcSq3B8cHJS6YUGN7SJ/s0/j4wF1kSb0ptqGfbEo q7CB49eJOjTF9Bf1BxzUZsRDBAcIW6Cp8PwuRu+HWqY3Jl72wUO4XDogkYXMlkjZcb xa3cC9v0caNbt3nu41KCSaGq4xdPKSTU7G2hToOg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, stable@kernel.org, Anandu Krishnan E , Dmitry Baryshkov , Srinivas Kandagatla Subject: [PATCH 7.1 189/271] misc: fastrpc: fix channel ctx ref leak when session alloc fails Date: Mon, 17 Aug 2026 15:31:54 +0200 Message-ID: <20260817132544.583535004@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260817132536.752504388@linuxfoundation.org> References: <20260817132536.752504388@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 7.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Anandu Krishnan E commit 310f7868399668c6d99d88acc9c4cf3462e69d5b upstream. fastrpc_channel_ctx_get() is called in fastrpc_device_open() before fastrpc_session_alloc(). If session alloc fails, the error path returns -EBUSY without calling fastrpc_channel_ctx_put(), leaking the reference. Fix by adding the missing put. Fixes: 278d56f970ae ("misc: fastrpc: Reference count channel context") Cc: stable@kernel.org Signed-off-by: Anandu Krishnan E Reviewed-by: Dmitry Baryshkov Signed-off-by: Srinivas Kandagatla Link: https://patch.msgid.link/20260724223342.629168-5-srini@kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- drivers/misc/fastrpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -1673,7 +1673,7 @@ static int fastrpc_device_open(struct in dev_err(&cctx->rpdev->dev, "No session available\n"); mutex_destroy(&fl->mutex); kfree(fl); - + fastrpc_channel_ctx_put(cctx); return -EBUSY; }