mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: dwmw2@infradead.org, iommu@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	ddutile@redhat.com, chrisw@redhat.com
Subject: Re: [RESEND PATCH v2 2/2] intel-iommu: Fix get_domain_for_dev() error path
Date: Thu, 21 Apr 2011 16:16:47 -0700	[thread overview]
Message-ID: <BANLkTinYLcgh=Q2ODv9PraDdTQJkf4B2qA@mail.gmail.com> (raw)
In-Reply-To: <20110304215226.7617.5852.stgit@s20.home>

On Fri, Mar 4, 2011 at 1:52 PM, Alex Williamson
<alex.williamson@redhat.com> wrote:
> 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>
> Acked-by: Donald Dutile <ddutile@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 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;
>        }
>
>

can you fix another path like David pointed out last year?

https://patchwork.kernel.org/patch/91732/

Thanks

Yinghai

      reply	other threads:[~2011-04-21 23:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-04 21:52 [RESEND PATCH v2 0/2] intel-iommu: Fix domain_ids exhaustion Alex Williamson
2011-03-04 21:52 ` [RESEND PATCH v2 1/2] intel-iommu: Unlink domain from iommu Alex Williamson
2011-03-04 21:52 ` [RESEND PATCH v2 2/2] intel-iommu: Fix get_domain_for_dev() error path Alex Williamson
2011-04-21 23:16   ` Yinghai Lu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTinYLcgh=Q2ODv9PraDdTQJkf4B2qA@mail.gmail.com' \
    --to=yinghai@kernel.org \
    --cc=alex.williamson@redhat.com \
    --cc=chrisw@redhat.com \
    --cc=ddutile@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®