> From: Liu, Yi L <yi.l.liu@xxxxxxxxx> > 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 */