Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 51802bb1 authored by Deepak Katragadda's avatar Deepak Katragadda
Browse files

qcom: ssr: Nullify subsys pointer in restart group on unregistering



During subsystem restart, the restart group structure is used to
call restart on all the subsystems in the group. It could be the
case however that subsys_unregister might have been called for
one of the subsystems in this list. Now, when this subsystem's
subsys pointer is accessed by the restart function, it could
cause a kernel crash to happen.

During subsys_unregister, null-ify the subsystem's pointer in the
restart group. The checks present in the restart code ignore null
pointers. When/if the subsystem driver calls subsys_register on
the subsystem again, the subsystem's pointer will be filled back
in the restart group.

Change-Id: I14e82bb11d39c8c9e6247ff6d80169a7456623ef
Signed-off-by: default avatarDeepak Katragadda <dkatraga@codeaurora.org>
parent b2493d05
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment