Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9dae887 authored by Sean Christopherson's avatar Sean Christopherson Committed by Greg Kroah-Hartman
Browse files

KVM: nVMX: Free the VMREAD/VMWRITE bitmaps if alloc_kvm_area() fails



commit 1b3ab5ad1b8ad99bae76ec583809c5f5a31c707c upstream.

Fixes: 34a1cd60 ("kvm: x86: vmx: move some vmx setting from vmx_init() to hardware_setup()")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 07cbcfc3
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -8011,7 +8011,10 @@ 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++)