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

Skip to content
Commit 598da31e authored by Jason Hrycay's avatar Jason Hrycay Committed by Dyneteve
Browse files

cpufreq_stats: Fix stats leak during update policy



When the cpufreq policy is moved from one CPU to another, the percpu
stats_table is overwritten and leaked. Properly free the old stats table
and ensure its protected in the non-sysfs paths of update policy and
acct_update_power. The sysfs entries are removed in the cpufreq core
driver before migrating the policy. We introduce a new spinlock
specifically for these operations to avoid needed to convert all the
other spinlocks into the irq safe variants since acct_update_power is
typically called in ISR context.

Change-Id: I95ff24c07834065cd0fd3c763a488a9843097a1d
Signed-off-by: default avatarJason Hrycay <jason.hrycay@motorola.com>
Reviewed-on: https://gerrit.mot.com/921752


SLTApproved: Slta Waiver <sltawvr@motorola.com>
SME-Granted: SME Approvals Granted
Reviewed-by: default avatarIgor Kovalenko <igork@motorola.com>
parent 0bf6c871
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