summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2009-06-30 03:38:09 +0100
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-06-30 03:57:38 +0100
commit3d7b0e4154b4963d6bd39991ec8eaa09caeb3994 (patch)
tree8c92261cda93b9635e7f84f218f47b2f6f68814e /drivers/pci
parent1bf20f0dc5629032ddd07617139d9fbca66c1642 (diff)
downloadlinux-3.10-3d7b0e4154b4963d6bd39991ec8eaa09caeb3994.tar.gz
linux-3.10-3d7b0e4154b4963d6bd39991ec8eaa09caeb3994.tar.bz2
linux-3.10-3d7b0e4154b4963d6bd39991ec8eaa09caeb3994.zip
intel-iommu: Don't free too much in dma_pte_free_pagetable()
The loop condition was wrong -- we should free a PMD only if its _entire_ range is within the range we're intending to clear. The early-termination condition was right, but not the loop. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/intel-iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index 40ce5a03f18..35bdd2a06ca 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -815,7 +815,7 @@ static void dma_pte_free_pagetable(struct dmar_domain *domain,
if (tmp + level_size(level) - 1 > last_pfn)
return;
- while (tmp <= last_pfn) {
+ while (tmp + level_size(level) - 1 <= last_pfn) {
pte = dma_pfn_level_pte(domain, tmp, level);
if (pte) {
free_pgtable_page(