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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Dec 2021 08:04:53 +0000 (09:04 +0100)
commitf1bcddbc7b6095b488ec892d687233095756ee28
tree63af48f48986d11c4e7e0dccb510db072669a757
parent5333bef073f8136b05f9536499cb9329f1c263d2
KVM: VMX: Set failure code in prepare_vmcs02()

[ Upstream commit bfbb307c628676929c2d329da0daf9d22afa8ad2 ]

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: 71f7347025bf ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kvm/vmx/nested.c