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

Skip to content
Commit 4568f636 authored by Ashay Jaiswal's avatar Ashay Jaiswal Committed by Gerrit - the friendly Code Review server
Browse files

power: smb-lib: Fix mutex deadlock during PD hard reset



rdstd_cc2_detach_work relies on "pd_hard_reset" flag for holding
"chg_lock" mutex, as pd_hard_reset is updated asynchronously there
could be a situation where "pd_hard_reset" is updated while
rdstd_cc2_detach_work is running thus resulting in deadlock.
Fix this by maintaining locking status in a variable and avoid lock
acquisition if lock is already held.

Change-Id: Iff9ee211ef4b80c5d48b3d73f0ccbe010434fd6c
Signed-off-by: default avatarAshay Jaiswal <ashayj@codeaurora.org>
parent b5117b38
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