Re: [PATCH v1] misc: fastrpc: fix channel ctx ref leak when session alloc fails
From: Dmitry Baryshkov
Date: Mon May 25 2026 - 05:17:09 EST
On Mon, May 25, 2026 at 02:23:40PM +0530, Anandu Krishnan E wrote:
> 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@xxxxxxxxxx
> Signed-off-by: Anandu Krishnan E <anandu.e@xxxxxxxxxxxxxxxx>
> ---
> drivers/misc/fastrpc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
--
With best wishes
Dmitry