Commit 62e062a
iommu/rockchip: prevent iommus dead loop when two masters share one IOMMU
When two masters share an IOMMU, calling ops->of_xlate during
the second master's driver init may overwrite iommu->domain set
by the first. This causes the check if (iommu->domain == domain)
in rk_iommu_attach_device() to fail, resulting in the same
iommu->node being added twice to &rk_domain->iommus, which can
lead to an infinite loop in subsequent &rk_domain->iommus operations.
Cc: <[email protected]>
Fixes: 25c2325 ("iommu/rockchip: Add missing set_platform_dma_ops callback")
Signed-off-by: Simon Xue <[email protected]>
Reviewed-by: Robin Murphy <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>1 parent 86731a2 commit 62e062a
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1157 | 1157 | | |
1158 | 1158 | | |
1159 | 1159 | | |
1160 | | - | |
1161 | 1160 | | |
1162 | 1161 | | |
1163 | 1162 | | |
| |||
1195 | 1194 | | |
1196 | 1195 | | |
1197 | 1196 | | |
| 1197 | + | |
| 1198 | + | |
1198 | 1199 | | |
1199 | 1200 | | |
1200 | 1201 | | |
| |||
0 commit comments