misc: fastrpc: Safekeep mmaps on interrupted invoke
authorAbel Vesa <abel.vesa@linaro.org>
Fri, 25 Nov 2022 07:14:03 +0000 (07:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Nov 2022 17:45:33 +0000 (18:45 +0100)
commit76e8e4ace1ed2c97dba3b1370e0e105e07c572bc
tree7e71cb2f562fd96e15d6fed169914a6988c0d530
parent0871561055e666da421d779397efcc1e5e964cab
misc: fastrpc: Safekeep mmaps on interrupted invoke

If the userspace daemon is killed in the middle of an invoke (e.g.
audiopd listerner invoke), we need to skip the unmapping on device
release, otherwise the DSP will crash. So lets safekeep all the maps
only if there is in invoke interrupted, by attaching them to the channel
context (which is resident until RPMSG driver is removed), and free them
on RPMSG driver remove.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20221125071405.148786-9-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/fastrpc.c