There is a bug in the CKRM CPU scheduler. This has been reported to the
[linux-2.6.git] / drivers / cpufreq / cpufreq.c
index a6f3510..a7fa79f 100644 (file)
@@ -722,7 +722,12 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy,
                            unsigned int target_freq,
                            unsigned int relation)
 {
-       return cpufreq_driver->target(policy, target_freq, relation);
+       int retval = -EINVAL;
+       lock_cpu_hotplug();
+       if (cpu_online(policy->cpu))
+               retval = cpufreq_driver->target(policy, target_freq, relation);
+       unlock_cpu_hotplug();
+       return retval;
 }
 EXPORT_SYMBOL_GPL(__cpufreq_driver_target);