cpufreq: Lock CPU online/offline in cpufreq_register_driver()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 29 Jul 2015 23:45:07 +0000 (01:45 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 31 Jul 2015 20:01:19 +0000 (22:01 +0200)
commitfdd320da84c63092fe6e155cb7b8d80f7f765fa9
tree43945999294bf7359160ef43faefcda25186ffe0
parent194d99c7e3ce54a8c7d8adf79fb1d8ad49a9bf9f
cpufreq: Lock CPU online/offline in cpufreq_register_driver()

To protect against races with concurrent CPU online/offline, call
get_online_cpus() before registering a cpufreq driver.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/cpufreq.c