From: Fenghua Yu Date: Mon, 6 Apr 2009 18:21:49 +0000 (-0700) Subject: Intel-IOMMU Alignment Issue in dma_pte_clear_range() X-Git-Tag: v2.6.30-rc2~73^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31d3568dfeb1dfb2735f119efe5ece7c6d40969c;p=pandora-kernel.git Intel-IOMMU Alignment Issue in dma_pte_clear_range() This issue was pointed out by Linus. In dma_pte_clear_range() in intel-iommu.c start = PAGE_ALIGN(start); end &= PAGE_MASK; npages = (end - start) / VTD_PAGE_SIZE; In partial page case, start could be bigger than end and npages will be negative. Currently the issue doesn't show up as a real bug in because start and end have been aligned to page boundary already by all callers. So the issue has been hidden. But it is dangerous programming practice. Signed-off-by: Fenghua Yu Signed-off-by: David Woodhouse --- Reading git-diff-tree failed