diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 52eb5f1fd023..793c52826b08 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -1962,7 +1962,9 @@ int iommu_attach_device(struct iommu_domain *domain, struct device *dev) */ mutex_lock(&group->mutex); ret = -EINVAL; - if (iommu_group_device_count(group) != 1) + + /* don't break attach if iommu shared by more than one master */ + if (iommu_group_device_count(group) < 1) goto out_unlock; ret = __iommu_attach_group(domain, group);