Commit 92c1e3cb authored by Kai Huang's avatar Kai Huang Committed by Sean Christopherson

KVM: VMX: Switch __vmx_exit() and kvm_x86_vendor_exit() in vmx_exit()

In the vmx_init() error handling path, the __vmx_exit() is done before
kvm_x86_vendor_exit().  They should follow the same order in vmx_exit().

But currently __vmx_exit() is done after kvm_x86_vendor_exit() in
vmx_exit().  Switch the order of them to fix.

Fixes: e32b1200 ("KVM: VMX: Do _all_ initialization before exposing /dev/kvm to userspace")
Signed-off-by: default avatarKai Huang <kai.huang@intel.com>
Link: https://lore.kernel.org/r/20240627010524.3732488-1-kai.huang@intel.comSigned-off-by: default avatarSean Christopherson <seanjc@google.com>
parent 23b2c508
......@@ -8626,9 +8626,9 @@ static void __vmx_exit(void)
static void vmx_exit(void)
{
kvm_exit();
__vmx_exit();
kvm_x86_vendor_exit();
__vmx_exit();
}
module_exit(vmx_exit);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment