Messages in this thread Patch in this message | | | From | Alex Williamson <> | Subject | [PATCH 2/2] intel-iommu: Fix get_domain_for_dev() error path | Date | Fri, 11 Feb 2011 14:24:59 -0700 |
| |
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@redhat.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 8bc56c1..21690a5 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; }
| |