Re: [PATCH v2 06/17] iommu: Add iommu_fwspec_alloc/dealloc()

2023-11-23 Thread Hector Martin
On 2023/11/22 1:00, Jason Gunthorpe wrote: > On Tue, Nov 21, 2023 at 03:47:48PM +0900, Hector Martin wrote: >>> Which is sensitive only to !NULL fwspec, and if EPROBE_DEFER is >>> returned fwspec will be freed and dev->iommu->fwspec will be NULL >>> here. >

Re: [PATCH v2 06/17] iommu: Add iommu_fwspec_alloc/dealloc()

2023-11-20 Thread Hector Martin
On 2023/11/19 23:13, Jason Gunthorpe wrote: > On Sun, Nov 19, 2023 at 06:19:43PM +0900, Hector Martin wrote: >>>> +static int iommu_fwspec_assign_iommu(struct iommu_fwspec *fwspec, >>>> + struct device *dev, >>>> +

Re: [PATCH v2 06/17] iommu: Add iommu_fwspec_alloc/dealloc()

2023-11-19 Thread Hector Martin
On 2023/11/19 17:10, Hector Martin wrote: > On 2023/11/15 23:05, Jason Gunthorpe wrote: >> Allow fwspec to exist independently from the dev->iommu by providing >> functions to allow allocating and freeing the raw struct iommu_fwspec. >> >> Reflow the existing paths

Re: [PATCH v2 06/17] iommu: Add iommu_fwspec_alloc/dealloc()

2023-11-19 Thread Hector Martin
one defers, ops will be NULL here and the check will fail with EINVAL. Adding a check for that case here fixes it: if (!ops) return driver_deferred_probe_check_state(dev); With that, for the whole series: Tested-by: Hector Martin I can't specifically