From e3cbebee4f58ee3ce4fc79ec067c799eb4a7c424 Mon Sep 17 00:00:00 2001 From: Shuah Khan Date: Thu, 15 Jan 2015 19:29:43 -0700 Subject: [PATCH] iommu: Fix trace_map() to report original iova and original size iommu_map() calls trace_map() with iova and size. trace_map() should report original iova and original size as opposed to iova and size after they get changed during mapping. size is always zero at the end of mapping which is useless to report and iova as it gets incremented, it is not as useful as the original iova. Change iommu_map() to call trace_map() to report original iova and original size. Signed-off-by: Shuah Khan Reported-by: Alex Williamson Signed-off-by: Joerg Roedel --- drivers/iommu/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 0e7aeb49dfa9..63ec9e4f03fc 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -1147,7 +1147,7 @@ int iommu_map(struct iommu_domain *domain, unsigned long iova, if (ret) iommu_unmap(domain, orig_iova, orig_size - size); else - trace_map(iova, paddr, size); + trace_map(orig_iova, paddr, orig_size); trace_map_end(iova, paddr, size); return ret; -- 2.11.0