Re: [PATCH v5 12/19] vfio-iommufd: Add detach_ioas for emulated VFIO devices

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

 



On Mon, Feb 27, 2023 at 03:11:28AM -0800, Yi Liu wrote:
> diff --git a/drivers/vfio/iommufd.c b/drivers/vfio/iommufd.c
> index bfaa9876499b..faf2516b0f06 100644
> --- a/drivers/vfio/iommufd.c
> +++ b/drivers/vfio/iommufd.c
> @@ -165,6 +165,12 @@ int vfio_iommufd_emulated_attach_ioas(struct vfio_device *vdev, u32 *pt_id)
>  
>  	lockdep_assert_held(&vdev->dev_set->lock);
>  
> +	if (!vdev->iommufd_ictx)
> +		return -EINVAL;

Same remark about WARN_ON here too

Jason



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux