Skip to content

Commit a4e61de

Browse files
quic-ekanguptgregkh
authored andcommitted
misc: fastrpc: Mark all sessions as invalid in cb_remove
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: f6f9279 ("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>
1 parent 41bccc9 commit a4e61de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/misc/fastrpc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2191,7 +2191,7 @@ static int fastrpc_cb_remove(struct platform_device *pdev)
21912191
int i;
21922192

21932193
spin_lock_irqsave(&cctx->lock, flags);
2194-
for (i = 1; i < FASTRPC_MAX_SESSIONS; i++) {
2194+
for (i = 0; i < FASTRPC_MAX_SESSIONS; i++) {
21952195
if (cctx->session[i].sid == sess->sid) {
21962196
cctx->session[i].valid = false;
21972197
cctx->sesscount--;

0 commit comments

Comments
 (0)