diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c index f106fd9782bfb..99c36a5438a75 100644 --- a/drivers/iommu/iova.c +++ b/drivers/iommu/iova.c @@ -676,7 +676,9 @@ iova_magazine_free_pfns(struct iova_magazine *mag, struct iova_domain *iovad) for (i = 0 ; i < mag->size; ++i) { struct iova *iova = private_find_iova(iovad, mag->pfns[i]); - BUG_ON(!iova); + if (WARN_ON(!iova)) + continue; + private_free_iova(iovad, iova); }