Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 8 Feb 2010 21:33:31 +0000 (13:33 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 8 Feb 2010 21:33:31 +0000 (13:33 -0800)
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] Fix ondemand to not request targets outside policy limits
  [CPUFREQ] Fix use after free of struct powernow_k8_data
  [CPUFREQ] fix default value for ondemand governor

1  2 
arch/x86/kernel/cpu/cpufreq/powernow-k8.c

@@@ -1136,7 -1136,7 +1136,7 @@@ static int powernowk8_target(struct cpu
        if (!alloc_cpumask_var(&oldmask, GFP_KERNEL))
                return -ENOMEM;
  
 -      cpumask_copy(oldmask, tsk_cpumask(current));
 +      cpumask_copy(oldmask, tsk_cpus_allowed(current));
        set_cpus_allowed_ptr(current, cpumask_of(pol->cpu));
  
        if (smp_processor_id() != pol->cpu) {
@@@ -1356,6 -1356,7 +1356,7 @@@ static int __devexit powernowk8_cpu_exi
  
        kfree(data->powernow_table);
        kfree(data);
+       per_cpu(powernow_data, pol->cpu) = NULL;
  
        return 0;
  }
@@@ -1375,7 -1376,7 +1376,7 @@@ static unsigned int powernowk8_get(unsi
        int err;
  
        if (!data)
-               return -EINVAL;
+               return 0;
  
        smp_call_function_single(cpu, query_values_on_cpu, &err, true);
        if (err)