mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
KVM: nVMX: Free the VMREAD/VMWRITE bitmaps if alloc_kvm_area() fails
commit1b3ab5ad1bupstream. Fixes:34a1cd60d1("kvm: x86: vmx: move some vmx setting from vmx_init() to hardware_setup()") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
07cbcfc33f
commit
c9dae887cf
@@ -8011,13 +8011,16 @@ static __init int hardware_setup(void)
|
||||
|
||||
kvm_mce_cap_supported |= MCG_LMCE_P;
|
||||
|
||||
return alloc_kvm_area();
|
||||
r = alloc_kvm_area();
|
||||
if (r)
|
||||
goto out;
|
||||
return 0;
|
||||
|
||||
out:
|
||||
for (i = 0; i < VMX_BITMAP_NR; i++)
|
||||
free_page((unsigned long)vmx_bitmap[i]);
|
||||
|
||||
return r;
|
||||
return r;
|
||||
}
|
||||
|
||||
static __exit void hardware_unsetup(void)
|
||||
|
||||
Reference in New Issue
Block a user