Commit be5a2d3f authored by Qinxin Xia's avatar Qinxin Xia Committed by Will Deacon
Browse files

iommu/arm-smmu-v3: Fix incorrect return in arm_smmu_attach_dev



After commit 48e7b8e2 ("iommu/arm-smmu-v3: Remove
arm_smmu_domain_finalise() during attach"), an error code is not
returned on the attach path when the smmu does not match with the
domain. This causes problems with VFIO because
vfio_iommu_type1_attach_group() relies on this check to determine domain
compatability.

Re-instate the -EINVAL return value when the SMMU doesn't match on the
device attach path.

Fixes: 48e7b8e2 ("iommu/arm-smmu-v3: Remove arm_smmu_domain_finalise() during attach")
Signed-off-by: default avatarQinxin Xia <xiaqinxin@huawei.com>
Link: https://lore.kernel.org/r/20250422112951.2027969-1-xiaqinxin@huawei.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 8ffd015d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment