[PATCH v2 4/6] KVM: x86: Explicitly state lockdep condition of msr_filter update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Suggested-by: Sean Christopherson <seanjc@xxxxxxxxxx>
Signed-off-by: Michal Luczaj <mhal@xxxxxxx>
---
 arch/x86/kvm/x86.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 8abce24ec020..a35183dc2314 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -6487,7 +6487,8 @@ static int kvm_vm_ioctl_set_msr_filter(struct kvm *kvm,
 
 	mutex_lock(&kvm->lock);
 	/* The per-VM filter is protected by kvm->lock... */
-	old_filter = rcu_replace_pointer(kvm->arch.msr_filter, new_filter, 1);
+	old_filter = rcu_replace_pointer(kvm->arch.msr_filter, new_filter,
+					 mutex_is_locked(&kvm->lock));
 	mutex_unlock(&kvm->lock);
 	synchronize_srcu(&kvm->srcu);
 
-- 
2.39.0




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux