cpufreq: Set policy for NULL before cleaning up kobj
__cpufreq_remove_dev_finish() cleans up the policy->kobj while
per_cpu(cpufreq_cpu_data) still contains a valid policy pointer.
This causes a race between kobject_get() called from cpufreq_cpu_get()
and cpu hotplug.
Set cpufreq_cpu_data to NULL before cleaning up kobject so that
subsequent cpufreq_cpu_get() will fail and thus not race with
cpu hotplug.
Change-Id: I0e2d1a64b7aac98aa69e137cc902e07d0edb786e
Signed-off-by:
Junjie Wu <junjiew@codeaurora.org>
Loading
Please register or sign in to comment