diff options
author | Ben Gardon <[email protected]> | 2021-03-15 16:38:01 -0700 |
---|---|---|
committer | Paolo Bonzini <[email protected]> | 2021-03-16 14:15:24 -0400 |
commit | 14f6fec2e8e04b83c87c339b8d8ff4cc62b23d35 (patch) | |
tree | 1694fa85ad6c054e6197ed3eadeb285ab01b34ce | |
parent | 70fb3e41a97a5fecc0aedc9a429479d702c3ab66 (diff) |
KVM: x86/mmu: Fix RCU usage when atomically zapping SPTEs
Fix a missing rcu_dereference in tdp_mmu_zap_spte_atomic.
Reported-by: kernel test robot <[email protected]>
Signed-off-by: Ben Gardon <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Sean Christopherson <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
-rw-r--r-- | arch/x86/kvm/mmu/tdp_mmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c index db2936cca4bf..946da74e069c 100644 --- a/arch/x86/kvm/mmu/tdp_mmu.c +++ b/arch/x86/kvm/mmu/tdp_mmu.c @@ -543,7 +543,7 @@ static inline bool tdp_mmu_zap_spte_atomic(struct kvm *kvm, * here since the SPTE is going from non-present * to non-present. */ - WRITE_ONCE(*iter->sptep, 0); + WRITE_ONCE(*rcu_dereference(iter->sptep), 0); return true; } |