]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: avoid loading a vCPU after .vm_destroy was called
authorMaxim Levitsky <mlevitsk@redhat.com>
Tue, 22 Mar 2022 17:24:42 +0000 (19:24 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 2 May 2022 15:42:42 +0000 (11:42 -0400)
commitdbccf0992cee022f8d9a1f82d2460190822a1bb4
treef04102ab884edb8455441a0488dcae82619427b8
parent782ba7a663fb1d67bd9a45d49f068bd993a29e42
KVM: x86: avoid loading a vCPU after .vm_destroy was called

This can cause various unexpected issues, since VM is partially
destroyed at that point.

For example when AVIC is enabled, this causes avic_vcpu_load to
access physical id page entry which is already freed by .vm_destroy.

Fixes: af9badde83f5 ("svm: Manage vcpu load/unload when enable AVIC")
Cc: stable@vger.kernel.org
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20220322172449.235575-2-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c