]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
AMD IOMMU: check for next_bit also in unmapped area
authorJoerg Roedel <joerg.roedel@amd.com>
Mon, 17 Nov 2008 18:11:46 +0000 (19:11 +0100)
committerJoerg Roedel <joerg.roedel@amd.com>
Tue, 18 Nov 2008 14:44:43 +0000 (15:44 +0100)
Impact: fix possible use of stale IO/TLB entries

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
arch/x86/kernel/amd_iommu.c

index 331b318304eb180d5e4f022253360d2c4efc49e6..e4899e0e878740726bfa7ea56e655c53a6b88f37 100644 (file)
@@ -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;
 }