[Intel-gfx] [PATCH v4 13/19] vfio: Add cdev_device_open_cnt to vfio_group

Tian, Kevin kevin.tian at intel.com
Wed Feb 22 07:31:17 UTC 2023


> From: Liu, Yi L <yi.l.liu at intel.com>
> Sent: Tuesday, February 21, 2023 11:48 AM
> 
> +
> +void vfio_device_unblock_group(struct vfio_device *device)
> +{
> +	struct vfio_group *group = device->group;
> +
> +	mutex_lock(&group->group_lock);
> +	group->cdev_device_open_cnt--;
> +	mutex_unlock(&group->group_lock);
> +}
> +

Add a WARN_ON(group->cdev_device_open_cnt) in vfio_group_release().

with that:

Reviewed-by: Kevin Tian <kevin.tian at intel.com>


More information about the Intel-gfx mailing list