mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vasant Hegde <vasant.hegde@amd.com>
To: Shuai Xue <xueshuai@linux.alibaba.com>,
	joro@8bytes.org, suravee.suthikulpanit@amd.com, will@kernel.org,
	robin.murphy@arm.com
Cc: bhelgaas@google.com, oliver.yang@linux.alibaba.com,
	zhuo.song@linux.alibaba.com, iommu@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu/amd: Put PCI device after handling PPR faults
Date: Mon, 27 Jul 2026 11:24:47 +0530	[thread overview]
Message-ID: <1b84076a-6395-43f1-837c-d5fac9a76dcd@amd.com> (raw)
In-Reply-To: <20260727030212.51759-1-xueshuai@linux.alibaba.com>



On 7/27/2026 8:32 AM, Shuai Xue wrote:
> iommu_call_iopf_notifier() looks up the requester with
> pci_get_domain_bus_and_slot(), which returns a PCI device with its
> reference count incremented.
> 
> Neither the successful iommu_report_device_fault() path nor the abort
> path drops that reference, so every handled PPR request leaks a PCI
> device reference.
> 
> This is the same ownership rule that was fixed for the old iommu_v2
> ppr_notifier() path by commit 6cf0981c2233 ("iommu/amd: Fix pci device
> refcount leak in ppr_notifier()"), but iommu_call_iopf_notifier() was
> added later as a separate PPR/IOPF notifier path.
> 
> Drop the PCI device reference after handling the PPR entry.
> 
> Fixes: 978d626b8f1a ("iommu/amd: Add IO page fault notifier handler")
> Cc: stable@vger.kernel.org
> Assisted-by: Qoder:Qwen-3.8-MAX-Preview
> Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>

Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>

-Vasant


  reply	other threads:[~2026-07-27  5:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-27  3:02 Shuai Xue
2026-07-27  5:54 ` Vasant Hegde [this message]
2026-07-30 12:51 ` Jörg Rödel

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=1b84076a-6395-43f1-837c-d5fac9a76dcd@amd.com \
    --to=vasant.hegde@amd.com \
    --cc=bhelgaas@google.com \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oliver.yang@linux.alibaba.com \
    --cc=robin.murphy@arm.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=will@kernel.org \
    --cc=xueshuai@linux.alibaba.com \
    --cc=zhuo.song@linux.alibaba.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

all inboxes | Powered by JetHome®