public inbox for iommu@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joro@8bytes.org>
To: Xiaotao Yin <xiaotao.yin@windriver.com>
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
	Kexin.Hao@windriver.com
Subject: Re: [PATCH V2] iommu/iova: Init the struct iova to fix the possible memleak
Date: Tue, 17 Dec 2019 11:02:17 +0100	[thread overview]
Message-ID: <20191217100217.GH8689@8bytes.org> (raw)
In-Reply-To: <20191209082404.40166-1-xiaotao.yin@windriver.com>

On Mon, Dec 09, 2019 at 04:24:04PM +0800, Xiaotao Yin wrote:
> The reason:
> When alloc_iova_mem() without initial with Zero, sometimes fpn_lo will equal to
> IOVA_ANCHOR by chance, so when return from __alloc_and_insert_iova_range() with
> -ENOMEM(iova32_full), the new_iova will not be freed in free_iova_mem().
> 
> Fixes: bb68b2fbfbd6 ("iommu/iova: Add rbtree anchor node")
> Signed-off-by: Xiaotao Yin <xiaotao.yin@windriver.com>
> ---
>  drivers/iommu/iova.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied for v5.5, thanks.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

      parent reply	other threads:[~2019-12-17 10:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-09  8:24 [PATCH V2] iommu/iova: Init the struct iova to fix the possible memleak Xiaotao Yin
2019-12-09 19:33 ` Robin Murphy
2019-12-10  4:22   ` Yin, Xiaotao
2019-12-17 10:02 ` Joerg Roedel [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=20191217100217.GH8689@8bytes.org \
    --to=joro@8bytes.org \
    --cc=Kexin.Hao@windriver.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiaotao.yin@windriver.com \
    /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