From 4a7ae76ea28a510f98b7c0650beb8cc792a84e9c Mon Sep 17 00:00:00 2001 From: Mitchel Humpherys Date: Wed, 29 Jul 2015 12:45:29 -0700 Subject: [PATCH] iommu/iommu-debug: Fix parsing of unmap size The unmap debugfs file write handler is currently incorrectly parsing the size to be unmapped (storing the IOVA as the size). Fix this by parsing from the correct offset (just after the first comma). Change-Id: I438851882052acc511c713706bc4f0cbf373353e Signed-off-by: Mitchel Humpherys --- drivers/iommu/iommu-debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/iommu-debug.c b/drivers/iommu/iommu-debug.c index f7755441b408..de7ffa7f3bc4 100644 --- a/drivers/iommu/iommu-debug.c +++ b/drivers/iommu/iommu-debug.c @@ -716,7 +716,7 @@ static ssize_t iommu_debug_unmap_write(struct file *file, if (kstrtou64(buf, 0, &iova)) goto invalid_format; - if (kstrtoul(buf, 0, &size)) + if (kstrtoul(comma1 + 1, 0, &size)) goto invalid_format; unmapped = iommu_unmap(ddev->domain, iova, size); -- 2.11.0