Commit e19e558d authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[CPUFREQ] Stop preempt count from going negative.

Broken failure path spotted by Dominik Brodowski.
parent 17660f34
......@@ -848,7 +848,7 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi
if (smp_processor_id() != pol->cpu) {
printk(KERN_ERR "limiting to cpu %u failed\n", pol->cpu);
goto err_out;
goto sched_out;
}
/* from this point, do not exit without restoring preempt and cpu */
......@@ -892,6 +892,7 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi
err_out:
preempt_enable_no_resched();
sched_out:
set_cpus_allowed(current, oldmask);
schedule();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment