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 6bf58c0..29f9129 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))