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

Commit 2895db67 authored by Jim Mattson's avatar Jim Mattson Committed by Radim Krčmář
Browse files

KVM: VMX: fix page leak in hardware_setup()



vmx_io_bitmap_b should not be allocated twice.

Fixes: 23611332 ("KVM: VMX: refactor setup of global page-sized bitmaps")
Signed-off-by: default avatarJim Mattson <jmattson@google.com>
Reviewed-by: default avatarKrish Sadhukhan <krish.sadhukhan@oracle.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
parent d59d51f0
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -6751,7 +6751,6 @@ static __init int hardware_setup(void)
			goto out;
			goto out;
	}
	}


	vmx_io_bitmap_b = (unsigned long *)__get_free_page(GFP_KERNEL);
	memset(vmx_vmread_bitmap, 0xff, PAGE_SIZE);
	memset(vmx_vmread_bitmap, 0xff, PAGE_SIZE);
	memset(vmx_vmwrite_bitmap, 0xff, PAGE_SIZE);
	memset(vmx_vmwrite_bitmap, 0xff, PAGE_SIZE);