Re: [PATCH 03/13] vfio: Provide better generic support for open/release vfio_device_ops

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

 



On Mon, Jul 19, 2021 at 02:58:58PM +0200, Cornelia Huck wrote:
> > -	ret = device->ops->open(device);
> > -	if (ret) {
> > -		module_put(device->dev->driver->owner);
> > -		vfio_device_put(device);
> > -		return ret;
> > +	mutex_lock(&device->dev_set->lock);
> > +	device->open_count++;
> > +	if (device->open_count == 1 && device->ops->open_device) {
> > +		ret = device->ops->open_device(device);
> > +		if (ret)
> > +			goto err_undo_count;
> 
> Won't that fail for mdev devices, until the patches later in this series
> have been applied? (i.e. bad for bisect)

What are you seeing? At this point all devices will have a NULL
open_device and skip this logic?

Jason



[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