]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: Set failure code in prepare_vmcs02()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 30 Nov 2021 12:53:37 +0000 (15:53 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 2 Dec 2021 09:12:11 +0000 (04:12 -0500)
commit4e3bf6ec89615c679d4254839d737694cddf887f
tree64a9d19d263134683ff753ff30d772090f0b67a7
parent856f87c04016f5c500b2d4e76ffc1442d81b8219
KVM: VMX: Set failure code in prepare_vmcs02()

The error paths in the prepare_vmcs02() function are supposed to set
*entry_failure_code but this path does not.  It leads to using an
uninitialized variable in the caller.

Fixes: f25ad049c5ab ("KVM: nVMX: Load GUEST_IA32_PERF_GLOBAL_CTRL MSR on VM-Entry")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Message-Id: <20211130125337.GB24578@kili>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c