diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index d552d2c..7e606d6 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c @@ -3256,8 +3259,10 @@ static int device_notifier(struct notifier_block *nb, if (!(domain->flags & DOMAIN_FLAG_VIRTUAL_MACHINE) && !(domain->flags & DOMAIN_FLAG_STATIC_IDENTITY) && - list_empty(&domain->devices)) + list_empty(&domain->devices)) { + flush_unmaps_timeout(0); domain_exit(domain); + } } return 0; @@ -3587,6 +3592,7 @@ static void intel_iommu_domain_destroy(struct iommu_domain *domain) struct dmar_domain *dmar_domain = domain->priv; domain->priv = NULL; + flush_unmaps_timeout(0); vm_domain_exit(dmar_domain); }