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

index f125e5c551c0db827d33110dfd0d25688053e3c7,2da4fa3bf6e9be47e8b5453b26614883e9339ba3..6e44519960c8f6413c3f0f54ba85ed591f172e81
@@@ -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)