]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Check every prev_roots in __kvm_mmu_free_obsolete_roots()
authorShaoqin Huang <shaoqin.huang@intel.com>
Tue, 7 Jun 2022 00:59:05 +0000 (18:59 -0600)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 7 Jun 2022 15:28:48 +0000 (11:28 -0400)
commitacc9fa83508542eaa3f37c6f757a4198762e23fe
tree24108ab0b194d57096d7be7438fcc4e0db366efc
parentc7e3eac9d1b0901be4cd9a23c41eb9f7981ffaee
KVM: x86/mmu: Check every prev_roots in __kvm_mmu_free_obsolete_roots()

When freeing obsolete previous roots, check prev_roots as intended, not
the current root.

Signed-off-by: Shaoqin Huang <shaoqin.huang@intel.com>
Fixes: d3ef34778552 ("KVM: x86/mmu: Zap only obsolete roots if a root shadow page is zapped")
Message-Id: <20220607005905.2933378-1-shaoqin.huang@intel.com>
Cc: stable@vger.kernel.org
Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c