Linux IOMMU Development
 help / color / mirror / Atom feed
From: Joerg Roedel <joro@8bytes.org>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: suravee.suthikulpanit@amd.com, iommu@lists.linux.dev
Subject: Re: [PATCH] iommu/amd/iommu_v2: fix pci device refcount leak in ppr_notifier()
Date: Sat, 19 Nov 2022 10:56:43 +0100	[thread overview]
Message-ID: <Y3ioW+E/J2aihv/C@8bytes.org> (raw)
In-Reply-To: <20221118093604.216371-1-yangyingliang@huawei.com>

On Fri, Nov 18, 2022 at 05:36:04PM +0800, Yang Yingliang wrote:
> As comment of pci_get_domain_bus_and_slot() says, it returns
> a pci device with refcount increment, when finish using it,
> the caller must decrement the reference count by calling
> pci_dev_put(). So call it before returning from ppr_notifier()
> to avoid refcount leak.
> 
> Fixes: daae2d25a477 ("iommu/amd: Don't copy GCR3 table root pointer")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>  drivers/iommu/amd/iommu_v2.c | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks.

      reply	other threads:[~2022-11-19  9:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-18  9:36 [PATCH] iommu/amd/iommu_v2: fix pci device refcount leak in ppr_notifier() Yang Yingliang
2022-11-19  9:56 ` 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=Y3ioW+E/J2aihv/C@8bytes.org \
    --to=joro@8bytes.org \
    --cc=iommu@lists.linux.dev \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=yangyingliang@huawei.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