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 Jason