[Intel-gfx] [PATCH v4 9/9] vfio/pci: Allow passing zero-length fd array in VFIO_DEVICE_PCI_HOT_RESET
Liu, Yi L
yi.l.liu at intel.com
Thu Apr 27 07:02:30 UTC 2023
> From: Tian, Kevin <kevin.tian at intel.com>
> Sent: Thursday, April 27, 2023 2:54 PM
>
> > From: Liu, Yi L <yi.l.liu at intel.com>
> > Sent: Wednesday, April 26, 2023 10:54 PM
> >
> > +static bool vfio_dev_in_iommufd_ctx(struct vfio_pci_core_device *vdev,
> > + struct iommufd_ctx *iommufd_ctx)
> > +{
> > + struct iommufd_ctx *iommufd = vfio_iommufd_physical_ictx(&vdev-
> > >vdev);
> > + struct iommu_group *iommu_group;
> > +
> > + if (!iommufd_ctx)
> > + return false;
> > +
> > + if (iommufd == iommufd_ctx)
> > + return true;
> > +
> > + iommu_group = iommu_group_get(vdev->vdev.dev);
> > + if (!iommu_group)
> > + return false;
> > +
> > + /*
> > + * Try to check if any device within iommu_group is bound with
> > + * the input iommufd_ctx.
> > + */
> > + return vfio_devset_iommufd_has_group(vdev->vdev.dev_set,
> > + iommufd_ctx, iommu_group);
>
> iommu_group is not put.
Oops. Yes.
More information about the Intel-gfx
mailing list