From patchwork Tue Jul 21 08:43:07 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 36479 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6L8hWDn031369 for ; Tue, 21 Jul 2009 08:43:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753226AbZGUIn1 (ORCPT ); Tue, 21 Jul 2009 04:43:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753057AbZGUIn1 (ORCPT ); Tue, 21 Jul 2009 04:43:27 -0400 Received: from gecko.sbs.de ([194.138.37.40]:22211 "EHLO gecko.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752827AbZGUIn1 (ORCPT ); Tue, 21 Jul 2009 04:43:27 -0400 Received: from mail2.sbs.de (localhost [127.0.0.1]) by gecko.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id n6L8h8dk007109; Tue, 21 Jul 2009 10:43:10 +0200 Received: from [139.25.109.167] (mchn012c.ww002.siemens.net [139.25.109.167] (may be forged)) by mail2.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id n6L8h7lD019219; Tue, 21 Jul 2009 10:43:08 +0200 Message-ID: <4A657F9B.1090305@siemens.com> Date: Tue, 21 Jul 2009 10:43:07 +0200 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Marcelo Tosatti CC: kvm-devel Subject: [PATCH] KVM: VMX: Fix locking imbalance on emulation failure Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 --- arch/x86/kvm/vmx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 3a75db3..7a8d464 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -3335,7 +3335,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))