On Thu, Aug 07, 2025 at 03:34:19PM +0530, Ling Xu wrote:
> copy_to_user() failure would cause an early return without cleaning up
> the fdlist, which has been updated by the DSP. This could lead to map
> leak. Fix this by redirecting to a cleanup path on failure, ensuring
> that all mapped buffers are properly released before returning.
> 
> Fixes: c68cfb718c8f ("misc: fastrpc: Add support for context Invoke method")
> Cc: sta...@kernel.org
> Co-developed-by: Ekansh Gupta <ekansh.gu...@oss.qualcomm.com>
> Signed-off-by: Ekansh Gupta <ekansh.gu...@oss.qualcomm.com>
> Signed-off-by: Ling Xu <quic_l...@quicinc.com>
> ---
>  drivers/misc/fastrpc.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.barysh...@oss.qualcomm.com>


-- 
With best wishes
Dmitry

Reply via email to