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

Skip to content
Commit b14bb0af authored by Umang Agrawal's avatar Umang Agrawal
Browse files

power: smb-lib: Fix mutex acquisition deadlock on PD hard reset



Mutex acquisition deadlock can happen while cancelling cc_dettach
work during pd_hard_reset from the function usbin_plugin_hard_reset
_locked on vbus rise which is called in the same lock context that
we try to acquire in the cc_dettach work routine.
Check if cc_dettach work is running during pd_hard_reset and use
trylock instead of mutex_lock to prevent any deadlock if mutext is
already held.

Change-Id: I5530deb9e654d3d12ba1b4bc6876f36127a0d5a5
Signed-off-by: default avatarUmang Agrawal <uagrawal@codeaurora.org>
parent eddc683b
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