[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110304215226.7617.5852.stgit@s20.home>
Date: Fri, 04 Mar 2011 14:52:30 -0700
From: Alex Williamson <alex.williamson@...hat.com>
To: dwmw2@...radead.org, iommu@...ts.linux-foundation.org
Cc: alex.williamson@...hat.com, linux-kernel@...r.kernel.org,
linux-pci@...r.kernel.org, ddutile@...hat.com, chrisw@...hat.com
Subject: [RESEND PATCH v2 2/2] intel-iommu: Fix get_domain_for_dev() error path
If we run out of domain_ids and fail iommu_attach_domain(), we
fall into domain_exit() without having setup enough of the
domain structure for this to do anything useful. In fact, it
typically runs off into the weeds walking the bogus domain->devices
list. Just free the domain.
Signed-off-by: Alex Williamson <alex.williamson@...hat.com>
Acked-by: Donald Dutile <ddutile@...hat.com>
---
drivers/pci/intel-iommu.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index c58dbd7..4a66bea 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -1835,7 +1835,7 @@ static struct dmar_domain *get_domain_for_dev(struct pci_dev *pdev, int gaw)
ret = iommu_attach_domain(domain, iommu);
if (ret) {
- domain_exit(domain);
+ free_domain_mem(domain);
goto error;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists