diff options
| author | Sean Christopherson <sean.j.christopherson@intel.com> | 2019-12-18 13:54:48 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-11 04:34:11 -0800 |
| commit | f6bf858cb2db0dd4cce79bba43b0a192259699bc (patch) | |
| tree | 5734747bff686d9211d8763ec59eb2858210bf32 /include/linux/ecryptfs.h | |
| parent | 889a65ede085b37c073c47e98fa3a9bcabf02aff (diff) | |
KVM: x86: Free wbinvd_dirty_mask if vCPU creation fails
commit 16be9ddea268ad841457a59109963fff8c9de38d upstream.
Free the vCPU's wbinvd_dirty_mask if vCPU creation fails after
kvm_arch_vcpu_init(), e.g. when installing the vCPU's file descriptor.
Do the freeing by calling kvm_arch_vcpu_free() instead of open coding
the freeing. This adds a likely superfluous, but ultimately harmless,
call to kvmclock_reset(), which only clears vcpu->arch.pv_time_enabled.
Using kvm_arch_vcpu_free() allows for additional cleanup in the future.
Fixes: f5f48ee15c2ee ("KVM: VMX: Execute WBINVD to keep data consistency with assigned devices")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/ecryptfs.h')
0 files changed, 0 insertions, 0 deletions
