KVM: nVMX: Add a WARN for freeing a loaded VMCS02
authorMark Kanda <mark.kanda@oracle.com>
Mon, 27 Nov 2017 23:22:26 +0000 (17:22 -0600)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 14 Dec 2017 08:26:46 +0000 (09:26 +0100)
commit276c796cfef5bdaf9aae055f520b8857eaa3fa19
tree1fe49210cebbd8903a7f41e02cfc94f5c03b8663
parent00647b44944a2f7212ac2c3825a465153d6e438f
KVM: nVMX: Add a WARN for freeing a loaded VMCS02

When attempting to free a loaded VMCS02, add a WARN and avoid
freeing it (to avoid use-after-free situations).

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mark Kanda <mark.kanda@oracle.com>
Reviewed-by: Ameya More <ameya.more@oracle.com>
Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/vmx.c