diff options
author | Jason Gunthorpe <[email protected]> | 2023-12-07 14:03:11 -0400 |
---|---|---|
committer | Joerg Roedel <[email protected]> | 2023-12-12 10:18:48 +0100 |
commit | 64945d1b0ed169aeffa59020941e4ac45ebc315a (patch) | |
tree | 82eb65a22706e60be14eacad0cb5d22e5f17a584 | |
parent | 5b4ea8b06eb79234a244ffc1f7405aa968f62069 (diff) |
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 <[email protected]>
Tested-by: Hector Martin <[email protected]>
Reviewed-by: Lu Baolu <[email protected]>
Reviewed-by: Moritz Fischer <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
-rw-r--r-- | drivers/iommu/iommu.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index d0a28667479a..df58025c001b 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -334,6 +334,8 @@ static struct dev_iommu *dev_iommu_get(struct device *dev) { struct dev_iommu *param = dev->iommu; + lockdep_assert_held(&iommu_probe_device_lock); + if (param) return param; |