Re: [PATCH v3 4/4] misc: fastrpc: Skip reference for DMA handles
From: Dmitry Baryshkov
Date: Thu Aug 14 2025 - 03:05:12 EST
On Thu, Aug 07, 2025 at 03:34:20PM +0530, Ling Xu wrote:
> If multiple dma handles are passed with same fd over a remote call
> the kernel driver takes a reference and expects that put for the
> map will be called as many times to free the map. But DSP only
> updates the fd one time in the fd list when the DSP refcount
> goes to zero and hence kernel make put call only once for the
> fd. This can cause SMMU fault issue as the same fd can be used
> in future for some other call.
>
> Fixes: 35a82b87135d ("misc: fastrpc: Add dma handle implementation")
> Cc: stable@xxxxxxxxxx
> Co-developed-by: Ekansh Gupta <ekansh.gupta@xxxxxxxxxxxxxxxx>
> Signed-off-by: Ekansh Gupta <ekansh.gupta@xxxxxxxxxxxxxxxx>
> Signed-off-by: Ling Xu <quic_lxu5@xxxxxxxxxxx>
> ---
> drivers/misc/fastrpc.c | 45 +++++++++++++++++++++++++-----------------
> 1 file changed, 27 insertions(+), 18 deletions(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
--
With best wishes
Dmitry