]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
misc: fastrpc: Skip reference for DMA handles
authorLing Xu <quic_lxu5@quicinc.com>
Fri, 12 Sep 2025 13:12:36 +0000 (14:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Sep 2025 14:34:10 +0000 (16:34 +0200)
commit10df039834f84a297c72ec962c0f9b7c8c5ca31a
tree9dfd2c66a81b94b99c0b345722218c83541f19d8
parentda1ba64176e0138f2bfa96f9e43e8c3640d01e1e
misc: fastrpc: Skip reference for DMA handles

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@kernel.org
Co-developed-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
Signed-off-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
Signed-off-by: Ling Xu <quic_lxu5@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
Link: https://lore.kernel.org/r/20250912131236.303102-5-srini@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/fastrpc.c