]> git.hungrycats.org Git - linux/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 07:55:06 +0000 (08:55 +0100)
commitb7902e34b0d7ce5bb20f9ab4e9344d4c8e0a085c
tree9c2c4cf98f1ec2dd9d0195eba161172af730a81d
parent82722b453dc2f967b172603e389ee7dc1b3137cc
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