projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73c1160
)
KVM: Fix preemption counter leak in kvm_timer_init()
author
Avi Kivity
<
[email protected]
>
Thu, 16 Dec 2010 10:16:34 +0000
(12:16 +0200)
committer
Avi Kivity
<
[email protected]
>
Thu, 16 Dec 2010 10:39:31 +0000
(12:39 +0200)
Based on a patch from Thomas Meyer.
Signed-off-by: Avi Kivity <
[email protected]
>
arch/x86/kvm/x86.c
patch
|
blob
|
history
diff --git
a/arch/x86/kvm/x86.c
b/arch/x86/kvm/x86.c
index e3abd84750c728693329481a9d2e63ffe3701644..b989e1f1e5d36b732d1d9c864f369b39a7459105 100644
(file)
--- a/
arch/x86/kvm/x86.c
+++ b/
arch/x86/kvm/x86.c
@@
-4564,9
+4564,11
@@
static void kvm_timer_init(void)
#ifdef CONFIG_CPU_FREQ
struct cpufreq_policy policy;
memset(&policy, 0, sizeof(policy));
- cpufreq_get_policy(&policy, get_cpu());
+ cpu = get_cpu();
+ cpufreq_get_policy(&policy, cpu);
if (policy.cpuinfo.max_freq)
max_tsc_khz = policy.cpuinfo.max_freq;
+ put_cpu();
#endif
cpufreq_register_notifier(&kvmclock_cpufreq_notifier_block,
CPUFREQ_TRANSITION_NOTIFIER);