Re: [PATCH V2 03/11] iommufd: Allow binding to a noiommu device

From: Jason Gunthorpe

Date: Mon Mar 23 2026 - 09:27:45 EST


On Sun, Mar 22, 2026 at 09:54:15AM +0000, Mostafa Saleh wrote:
> > +struct iommufd_device *iommufd_device_bind(struct iommufd_ctx *ictx,
> > + struct device *dev, u32 *id)
> > +{
> > + struct iommufd_device *idev;
> > + int rc;
> > +
> > idev = iommufd_object_alloc(ictx, idev, IOMMUFD_OBJ_DEVICE);
>
> The next code introduces new error cases, do that need to be cleaned in
> that case by calling iommufd_object_abort_and_destroy()?

It should probably use iommufd_object_alloc_ucmd() so the core code
manages the lifecycle?

Jason