KVM: VMX: Fix locking imbalance on emulation failure
authorJan Kiszka <jan.kiszka@siemens.com>
Tue, 21 Jul 2009 08:43:07 +0000 (10:43 +0200)
committerAvi Kivity <avi@redhat.com>
Wed, 5 Aug 2009 10:59:45 +0000 (13:59 +0300)
We have to disable preemption and IRQs on every exit from
handle_invalid_guest_state, otherwise we generate at least a
preempt_disable imbalance.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/vmx.c

index 6bf58c083f0a2108609404ffaa193685916cdf6a..29f912927a588bda4e9a3fc06ea2412ec04b5ebc 100644 (file)
@@ -3168,7 +3168,7 @@ static void handle_invalid_guest_state(struct kvm_vcpu *vcpu,
 
                if (err != EMULATE_DONE) {
                        kvm_report_emulation_failure(vcpu, "emulation failure");
-                       return;
+                       break;
                }
 
                if (signal_pending(current))