[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250613135817.GG1174925@nvidia.com>
Date: Fri, 13 Jun 2025 10:58:17 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Nicolin Chen <nicolinc@...dia.com>
Cc: kevin.tian@...el.com, will@...nel.org, robin.murphy@....com,
joro@...tes.org, ddutile@...hat.com, yi.l.liu@...el.com,
peterz@...radead.org, jsnitsel@...hat.com, praan@...gle.com,
linux-arm-kernel@...ts.infradead.org, iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org, patches@...ts.linux.dev,
baolu.lu@...ux.intel.com
Subject: Re: [PATCH v1 11/12] iommufd: Introduce iommufd_object_alloc_ucmd
helper
On Mon, Jun 09, 2025 at 10:13:34AM -0700, Nicolin Chen wrote:
> +#define iommufd_object_alloc_ucmd(ucmd, ptr, type) \
> + __iommufd_object_alloc_ucmd(ucmd, ptr, type, obj)
Lets add a comment here and on the normal iommufd_object_alloc
explaining that this function automatically calls finalize and abort,
the non ucmd version requires the caller to do so.
> +struct iommufd_object *_iommufd_object_alloc_ucmd(struct iommufd_ucmd *ucmd,
> + size_t size,
> + enum iommufd_object_type type)
> +{
> + struct iommufd_object *new_obj;
> +
> + if (ucmd->new_obj)
WARN_ON? Something is coded wrong if we hit this right?
Jason
Powered by blists - more mailing lists