Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d4f8f7a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "iommu: arm-smmu: Fix locking issue"

parents 43cfd644 4b9a7ad0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2393,6 +2393,8 @@ static size_t arm_smmu_map_sg(struct iommu_domain *domain, unsigned long iova,
	if (ret)
		return ret;

	arm_smmu_secure_domain_lock(smmu_domain);

	__saved_iova_start = iova;
	idx_start = idx_end = 0;
	sg_start = sg_end = sg;
@@ -2430,6 +2432,7 @@ static size_t arm_smmu_map_sg(struct iommu_domain *domain, unsigned long iova,
		arm_smmu_unmap(domain, __saved_iova_start, size_to_unmap);
		iova = __saved_iova_start;
	}
	arm_smmu_secure_domain_unlock(smmu_domain);
	arm_smmu_domain_power_off(domain, smmu_domain->smmu);
	return iova - __saved_iova_start;
}