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. [ported to apq8084-common by Corinna Vinschen <xda@vinschen.de>] Change-Id: I95ff24c07834065cd0fd3c763a488a9843097a1d Signed-off-by:Jason 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:
Igor Kovalenko <igork@motorola.com>
Loading
Please register or sign in to comment