Skip to content

Commit 6f5cbd3

Browse files
jgunthorpemarcan
authored andcommitted
iommu: Mark dev_iommu_get() with lockdep
Allocation of dev->iommu must be done under the iommu_probe_device_lock. Mark this with lockdep to discourage future mistakes. Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
1 parent 702ac07 commit 6f5cbd3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/iommu/iommu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@ static struct dev_iommu *dev_iommu_get(struct device *dev)
340340
{
341341
struct dev_iommu *param = dev->iommu;
342342

343+
lockdep_assert_held(&iommu_probe_device_lock);
344+
343345
if (param)
344346
return param;
345347

0 commit comments

Comments
 (0)