]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
KVM: ia64: ia64 vcpu_reset() do not call kmalloc() with irqs disabled
authorJes Sorensen <jes@sgi.com>
Fri, 17 Apr 2009 14:43:27 +0000 (16:43 +0200)
committerAvi Kivity <avi@redhat.com>
Wed, 10 Jun 2009 08:48:44 +0000 (11:48 +0300)
Restore local irq enabled state before calling kvm_arch_vcpu_init(),
which calls kmalloc(GFP_KERNEL).

Signed-off-by: Jes Sorensen <jes@sgi.com>
Acked-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/ia64/kvm/kvm-ia64.c

index cf5a19390f4e51bc6e6aed6edae491674d88b07c..be4413e1f43ff335bd9c6a8d7941da58208bdbf8 100644 (file)
@@ -2001,6 +2001,7 @@ static int vcpu_reset(struct kvm_vcpu *vcpu)
        long psr;
        local_irq_save(psr);
        r = kvm_insert_vmm_mapping(vcpu);
+       local_irq_restore(psr);
        if (r)
                goto fail;
 
@@ -2013,7 +2014,6 @@ static int vcpu_reset(struct kvm_vcpu *vcpu)
        kvm_purge_vmm_mapping(vcpu);
        r = 0;
 fail:
-       local_irq_restore(psr);
        return r;
 }