Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a43e574 authored by David Woodhouse's avatar David Woodhouse
Browse files

intel-iommu: Don't keep freeing page zero in dma_pte_free_pagetable()



Check dma_pte_present() and only free the page if there _is_ one.
Kind of surprising that there was no warning about this.

Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 75e6bf96
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -826,8 +826,10 @@ static void dma_pte_free_pagetable(struct dmar_domain *domain,
				continue;
			}
			do {
				if (dma_pte_present(pte)) {
					free_pgtable_page(phys_to_virt(dma_pte_addr(pte)));
					dma_clear_pte(pte);
				}
				pte++;
				tmp += level_size(level);
			} while (!first_pte_in_page(pte) &&