Re: [PATCH] kvm: lock slots_lock around device assignment

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

 



On Tue, Apr 17, 2012 at 09:46:44PM -0600, Alex Williamson wrote:
> @@ -340,7 +343,11 @@ int kvm_iommu_unmap_guest(struct kvm *kvm)
>  	if (!domain)
>  		return 0;
>  
> +	mutex_lock(&kvm->slots_lock);
>  	kvm_iommu_unmap_memslots(kvm);
> +	kvm->arch.iommu_domain = NULL;
> +	mutex_unlock(&kvm->slots_lock);
> +
>  	iommu_domain_free(domain);
>  	return 0;
>  }

This might trigger lockdep warnings due to

kvm_vm_ioctl_create_vcpu
mutex_lock(&kvm->lock)
kvm_put_kvm(kvm)
kvm_destroy_vm
kvm_iommu_unmap_guest 

sequence.

Better drop it, it is not necessary in vm destruction
path (since only user is self).

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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