Commit 14f6fec2 authored by Ben Gardon's avatar Ben Gardon Committed by Paolo Bonzini
Browse files

KVM: x86/mmu: Fix RCU usage when atomically zapping SPTEs



Fix a missing rcu_dereference in tdp_mmu_zap_spte_atomic.

Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarBen Gardon <bgardon@google.com>
Message-Id: <20210315233803.2706477-3-bgardon@google.com>
Reviewed-by: default avatarSean Christopherson <seanjc@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 70fb3e41
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}