Skip to content

Commit

Permalink
intel-iommu: Flush unmaps at domain_exit
Browse files Browse the repository at this point in the history
We typically batch unmaps to be lazily flushed out at
regular intervals.  When we destroy a domain, we need
to force a flush of these lazy unmaps to be sure none
reference the domain we're about to free.

Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=35062
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Cc: stable@kernel.org
  • Loading branch information
Alex Williamson authored and David Woodhouse committed May 24, 2011
1 parent b3a530e commit 7b66835
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/pci/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1422,6 +1422,10 @@ static void domain_exit(struct dmar_domain *domain)
if (!domain)
return;

/* Flush any lazy unmaps that may reference this domain */
if (!intel_iommu_strict)
flush_unmaps_timeout(0);

domain_remove_dev_info(domain);
/* destroy iovas */
put_iova_domain(&domain->iovad);
Expand Down

0 comments on commit 7b66835

Please sign in to comment.