Skip to content
Commit 62e062a2 authored by Simon Xue's avatar Simon Xue Committed by Joerg Roedel
Browse files

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: <stable@vger.kernel.org>
Fixes: 25c23255 ("iommu/rockchip: Add missing set_platform_dma_ops callback")
Signed-off-by: default avatarSimon Xue <xxm@rock-chips.com>
Reviewed-by: Robin Murphy's avatarRobin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20250623020018.584802-1-xxm@rock-chips.com


Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent 86731a2a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment