[Intel-gfx] [PATCH v6 07/24] vfio: Block device access via device fd until device is opened

Tian, Kevin kevin.tian at intel.com
Fri Mar 10 04:50:40 UTC 2023


> From: Liu, Yi L <yi.l.liu at intel.com>
> Sent: Wednesday, March 8, 2023 9:29 PM
>
> @@ -1114,6 +1114,10 @@ static long vfio_device_fops_unl_ioctl(struct file
> *filep,
>  	struct vfio_device *device = df->device;
>  	int ret;
> 
> +	/* Paired with smp_store_release() in vfio_device_group_open() */
> +	if (!smp_load_acquire(&df->access_granted))
> +		return -EINVAL;
> +

/* Paired with smp_store_release() right after vfio_device_open() is called */


More information about the Intel-gfx mailing list