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

Skip to content
Commit 25064a00 authored by Amir Vajid's avatar Amir Vajid
Browse files

PM / devfreq: memlat: fix deadlock and pointer check in new design



We currently wait for a cpu_grp's work function (memlat_monitor_work)
to finish executing when we attempt to cancel it. However this can
result in a deadlock since we also hold mons_lock when cancelling it.
Also check that we have at least one active mon when our work function
runs to prevent reading the common PMU counters after the last mon
within a cpu_grp is stopped.

Lastly, add missing pointer check in delete_event(). This protects us
from trying to delete events that aren't defined (e.g. stall-ev).

Change-Id: I28afe1de7111984bc3d85a37fdc17d14442aa2a8
Signed-off-by: default avatarAmir Vajid <avajid@codeaurora.org>
parent 84f8bed8
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