From: David Woodhouse Date: Sat, 19 Sep 2009 14:36:28 +0000 (-0700) Subject: intel-iommu: Fix integer overflow in dma_pte_{clear_range,free_pagetable}() X-Git-Tag: v2.6.32-rc1~162^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59c36286b74ae6a8adebf6e133a83d7f2e3e6704;p=pandora-kernel.git intel-iommu: Fix integer overflow in dma_pte_{clear_range,free_pagetable}() If end_pfn is equal to (unsigned long)-1, then the loop will never end. Seen on 32-bit kernel, but could have happened on 64-bit too once we get hardware that supports 64-bit guest addresses. Change both functions to a 'do {} while' loop with the test at the end, and check for the PFN having wrapper round to zero. Reported-by: Benjamin LaHaise Tested-by: Benjamin LaHaise Signed-off-by: David Woodhouse --- Reading git-diff-tree failed