Re: [RFC v2 08/11] vfio: Refactor vfio_device_first_open() and _last_close()

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

 



On 2022/11/25 22:15, Jason Gunthorpe wrote:
On Fri, Nov 25, 2022 at 10:06:13PM +0800, Yi Liu wrote:
On 2022/11/25 20:37, Jason Gunthorpe wrote:
On Fri, Nov 25, 2022 at 04:57:27PM +0800, Yi Liu wrote:

+static int vfio_device_group_open(struct vfio_device *device)
+{
+	int ret;
+
+	mutex_lock(&device->group->group_lock);

now the group path holds group_lock first, and then device_set->lock.
this is different with existing code. is it acceptable? I had a quick
check with this change, basic test is good. no a-b-b-a locking issue.

I looked for a while and couldn't find a reason why it wouldn't be OK

ok, so updated this commit as below:

Yeah, can you update the cdev series too, lets see how it looks

yes, it's wip, not finished yet. I'll update tomorrow.

--
Regards,
Yi Liu



[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