]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
misc: fastrpc: Unmap only if buffer is unmapped from DSP
authorEkansh Gupta <quic_ekangupt@quicinc.com>
Fri, 13 Oct 2023 12:20:07 +0000 (13:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Nov 2023 08:35:31 +0000 (09:35 +0100)
commitcc87c73eac2df18e5c906f0eedab0814ca597d03
tree0cf209743469a6a04e96a46b39c9250a5001f5e2
parent38c5faf2a9840d6ac60d8b8f9f8a0a3939e97bfe
misc: fastrpc: Unmap only if buffer is unmapped from DSP

commit 509143385db364c67556a914bef6c9a42fd2c74c upstream.

For unmapping any buffer from kernel, it should first be unmapped
from DSP. In case unmap from DSP request fails, the map should not
be removed from kernel as it might lead to SMMU faults and other
memory issues.

Fixes: 5c1b97c7d7b7 ("misc: fastrpc: add support for FASTRPC_IOCTL_MEM_MAP/UNMAP")
Cc: stable <stable@kernel.org>
Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20231013122007.174464-5-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/fastrpc.c