From d0670bb7098e8ec768bb2446035682553f9dc02f Mon Sep 17 00:00:00 2001 From: Spencer Date: Fri, 2 Dec 2016 17:41:20 -0500 Subject: [PATCH 1/2] Update intel-iommu.c --- drivers/iommu/intel-iommu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index d8376c2d18b3bf..b9d513c5497492 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -1565,6 +1565,11 @@ static void iommu_flush_dev_iotlb(struct dmar_domain *domain, u16 sid, qdep; unsigned long flags; struct device_domain_info *info; + + /* device has already been flushed/unmapped? */ + WARN_ON(!domain); + if (!domain) + return; if (!domain->has_iotlb_device) return; From e066b5f672a7100338154a1b692885fe6e912e81 Mon Sep 17 00:00:00 2001 From: Spencer Date: Fri, 2 Dec 2016 17:46:09 -0500 Subject: [PATCH 2/2] Update intel-iommu.c --- drivers/iommu/intel-iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index b9d513c5497492..c03b0dbf483d3f 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -1567,8 +1567,7 @@ static void iommu_flush_dev_iotlb(struct dmar_domain *domain, struct device_domain_info *info; /* device has already been flushed/unmapped? */ - WARN_ON(!domain); - if (!domain) + if (WARN_ON(!domain)) return; if (!domain->has_iotlb_device)