]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
misc: fastrpc: Mark all sessions as invalid in cb_remove
authorEkansh Gupta <quic_ekangupt@quicinc.com>
Mon, 8 Jan 2024 11:48:33 +0000 (17:18 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:25:04 +0000 (09:25 +0100)
commite3c4e10e3a7923f1c336759bab033d75d2059fc8
treee8e6b710b02ac3ef98b83e2c0d781931800e7760
parenta7ae586f6f6024f490b8546c8c84670f96bb9b68
misc: fastrpc: Mark all sessions as invalid in cb_remove

commit a4e61de63e34860c36a71d1a364edba16fb6203b upstream.

In remoteproc shutdown sequence, rpmsg_remove will get called which
would depopulate all the child nodes that have been created during
rpmsg_probe. This would result in cb_remove call for all the context
banks for the remoteproc. In cb_remove function, session 0 is
getting skipped which is not correct as session 0 will never become
available again. Add changes to mark session 0 also as invalid.

Fixes: f6f9279f2bf0 ("misc: fastrpc: Add Qualcomm fastrpc basic driver model")
Cc: stable <stable@kernel.org>
Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com>
Link: https://lore.kernel.org/r/20240108114833.20480-1-quic_ekangupt@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/fastrpc.c