David Woodhouse 59c36286b7 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 <ben.lahaise@neterion.com>
Tested-by: Benjamin LaHaise <ben.lahaise@neterion.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-09-19 07:36:28 -07:00
..
2009-07-12 12:22:34 -07:00
2009-06-16 14:29:33 -07:00
2009-05-12 12:17:36 +02:00
2009-04-05 02:14:15 -04:00
2009-04-22 14:49:33 -07:00
2009-02-13 12:01:56 -08:00
2008-06-25 16:05:13 -07:00
2009-06-29 12:13:56 -07:00
2009-07-12 12:22:34 -07:00