Skip to content
Commit 8cfcfd39 authored by Pan Xinhui's avatar Pan Xinhui Committed by Rafael J. Wysocki
Browse files

acpi-cpufreq: Fix an ACPI perf unregister issue



As policy->cpu may not be same in acpi_cpufreq_cpu_init() and
acpi_cpufreq_cpu_exit(). There is a risk that we use different CPU
to un/register ACPI performance. So acpi_processor_unregister_performance()
may not be able to do the cleanup work. That causes a memory leak. And
if there will be another acpi_processor_register_performance() call,
it may also fail thanks to the internal check of pr->performace.

So add a new struct acpi_cpufreq_data field, acpi_perf_cpu, to fix
this issue.

Signed-off-by: default avatarPan Xinhui <xinhuix.pan@intel.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
[ rjw: Changelog ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 7f0fa40f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment