Linux IOMMU Development
 help / color / mirror / Atom feed
From: Baolu Lu <baolu.lu@linux.intel.com>
To: Yang Yingliang <yangyingliang@huawei.com>,
	dwmw2@infradead.org, joro@8bytes.org, will@kernel.org,
	robin.murphy@arm.com
Cc: baolu.lu@linux.intel.com, iommu@lists.linux.dev
Subject: Re: [PATCH v2] iommu/vt-d: fix pci device refcount leak in prq_event_thread()
Date: Thu, 1 Dec 2022 12:03:53 +0800	[thread overview]
Message-ID: <ca42703c-1a1d-63f1-eee0-8b128c8d809e@linux.intel.com> (raw)
In-Reply-To: <20221119144028.2452731-1-yangyingliang@huawei.com>

On 2022/11/19 22:40, 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 pci_dev_put() after using the 'pdev'
> to avoid refcount leak.
> 
> Besides, if the 'pdev' is null or intel_svm_prq_report()
> returns error, there is no need to trace this fault.
> 
> Fixes: 06f4b8d09dba ("iommu/vt-d: Remove unnecessary SVA data accesses in page fault path")
> Suggested-by: Lu Baolu<baolu.lu@linux.intel.com>
> Signed-off-by: Yang Yingliang<yangyingliang@huawei.com>

Queued for Joerg. Thank you!

Best regards,
baolu

      reply	other threads:[~2022-12-01  4:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-19 14:40 [PATCH v2] iommu/vt-d: fix pci device refcount leak in prq_event_thread() Yang Yingliang
2022-12-01  4:03 ` Baolu 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=ca42703c-1a1d-63f1-eee0-8b128c8d809e@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=robin.murphy@arm.com \
    --cc=will@kernel.org \
    --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