Messages in this thread | | | Subject | Re: [PATCH 6/6] intel-iommu: Don't call domain_exit if can not attach with iommu | From | David Woodhouse <> | Date | Fri, 09 Apr 2010 16:43:03 +0100 |
| |
On Thu, 2010-04-08 at 19:58 +0100, Yinghai Lu wrote: > > --- a/drivers/pci/intel-iommu.c > +++ b/drivers/pci/intel-iommu.c > @@ -1853,7 +1853,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; > } >
Um, shouldn't the next error have the same change? If domain_init() fails before it gets round to initialising the domain->devices list, the same oops in domain_exit() will occur, won't it? It's because domain->devices.{next,prev} are both NULL?
-- David Woodhouse Open Source Technology Centre David.Woodhouse@intel.com Intel Corporation
| |