> From: Jason Gunthorpe <jgg@xxxxxxxxxx> > Sent: Wednesday, August 9, 2023 1:27 AM > > @@ -1800,11 +1801,18 @@ struct probe_iommu_args { > static int probe_iommu_group(struct device *dev, void *data) > { > struct probe_iommu_args *args = data; > + bool need_lock; > int ret; > > - device_lock(dev); > + /* Probing the iommu itself is always done under the device_lock */ > + need_lock = !args->iommu || args->iommu->hwdev != dev; > + is !args->iommu a valid case? btw probably a dumb question. Why do we continue to probe the iommu device itself instead of skipping it? The group is a concept for devices which require DMA protection from iommu instead of for the iommu device itself...