]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: fix invalid cpu passed to smp_call_function_single
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Wed, 28 Nov 2012 12:53:15 +0000 (20:53 +0800)
committerMarcelo Tosatti <mtosatti@redhat.com>
Thu, 29 Nov 2012 00:04:58 +0000 (22:04 -0200)
commitf5a8a5e2c01b87fc7ff765daae9399d53124934e
tree112c643ad9c04f31f654c31f218ad38cb31e08d1
parent39e55a09cd3bb734fc6fc2c52a8ff743cb64ff91
KVM: VMX: fix invalid cpu passed to smp_call_function_single

In loaded_vmcs_clear, loaded_vmcs->cpu is the fist parameter passed to
smp_call_function_single, if the target cpu is downing (doing cpu hot remove),
loaded_vmcs->cpu can become -1 then -1 is passed to smp_call_function_single

It can be triggered when vcpu is being destroyed, loaded_vmcs_clear is called
in the preemptionable context

Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/vmx.c