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 <mitchelh@codeaurora.org>
This commit is contained in:
Mitchel Humpherys 2015-07-29 12:45:29 -07:00 committed by David Keitel
parent d1f111a6f9
commit 4a7ae76ea2

View file

@ -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);