Commit 1fdefb8b authored by Michal Luczaj's avatar Michal Luczaj Committed by Sean Christopherson
Browse files

KVM: x86: Explicitly state lockdep condition of msr_filter update



Replace `1` with the actual mutex_is_locked() check.

Suggested-by: default avatarSean Christopherson <seanjc@google.com>
Signed-off-by: default avatarMichal Luczaj <mhal@rbox.co>
Link: https://lore.kernel.org/r/20230107001256.2365304-5-mhal@rbox.co


[sean: delete the comment that explained the hardocded '1']
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent 4d85cfca
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -6492,8 +6492,8 @@ static int kvm_vm_ioctl_set_msr_filter(struct kvm *kvm,
	}
	}


	mutex_lock(&kvm->lock);
	mutex_lock(&kvm->lock);
	/* The per-VM filter is protected by kvm->lock... */
	old_filter = rcu_replace_pointer(kvm->arch.msr_filter, new_filter,
	old_filter = rcu_replace_pointer(kvm->arch.msr_filter, new_filter, 1);
					 mutex_is_locked(&kvm->lock));
	mutex_unlock(&kvm->lock);
	mutex_unlock(&kvm->lock);
	synchronize_srcu(&kvm->srcu);
	synchronize_srcu(&kvm->srcu);