From: Joerg Roedel Date: Mon, 17 Nov 2008 18:11:46 +0000 (+0100) Subject: AMD IOMMU: check for next_bit also in unmapped area X-Git-Tag: v2.6.28-rc6~14^2^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8501c45cc32c311ae755a2d5ac8c4a5f04908d42;p=linux-2.6-omap-h63xx.git AMD IOMMU: check for next_bit also in unmapped area Impact: fix possible use of stale IO/TLB entries Signed-off-by: Joerg Roedel --- diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 331b318304e..e4899e0e878 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c @@ -537,7 +537,7 @@ static void dma_ops_free_addresses(struct dma_ops_domain *dom, address >>= PAGE_SHIFT; iommu_area_free(dom->bitmap, address, pages); - if (address + pages >= dom->next_bit) + if (address >= dom->next_bit) dom->need_flush = true; }