lkml.org 
[lkml]   [2010]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 6/6] intel-iommu: Don't call domain_exit if can not attach with iommu
From
Date
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



\
 
 \ /
  Last update: 2010-04-09 17:45    [W:0.129 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site