git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[CPUFREQ] Fix use after free of struct powernow_k8_data
[pandora-kernel.git]
/
arch
/
x86
/
kernel
/
cpu
/
cpufreq
/
powernow-k8.c
diff --git
a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
index
a9df944
..
2da4fa3
100644
(file)
--- a/
arch/x86/kernel/cpu/cpufreq/powernow-k8.c
+++ b/
arch/x86/kernel/cpu/cpufreq/powernow-k8.c
@@
-1356,6
+1356,7
@@
static int __devexit powernowk8_cpu_exit(struct cpufreq_policy *pol)
kfree(data->powernow_table);
kfree(data);
+ per_cpu(powernow_data, pol->cpu) = NULL;
return 0;
}
@@
-1375,7
+1376,7
@@
static unsigned int powernowk8_get(unsigned int cpu)
int err;
if (!data)
- return
-EINVAL
;
+ return
0
;
smp_call_function_single(cpu, query_values_on_cpu, &err, true);
if (err)