iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 1/2] iommu/vt-d: Fix PCI device reference count leak in has_external pci()
@ 2022-12-25 12:11 Zeno Davatz
  2022-12-25 13:16 ` Baolu Lu
  2022-12-26 13:29 ` [PATCH 1/2] iommu/vt-d: Fix PCI device reference count leak in has_external pci() #forregzbot Thorsten Leemhuis
  0 siblings, 2 replies; 14+ messages in thread
From: Zeno Davatz @ 2022-12-25 12:11 UTC (permalink / raw)
  To: wangxiongfeng2
  Cc: baolu.lu, dwmw2, iommu, joro, jroedel, robin.murphy, will, yangyingliang

[-- Attachment #1: Type: text/plain, Size: 184 bytes --]

Hi

I am getting this hang with kernel 6.1. See attachment.

Is this related to your patch?

Kernel 6.1 does not boot for me. Kernel 6.0 was fine.

Thank you for your reply.

Best
Zeno

[-- Attachment #2: image0.jpeg --]
[-- Type: image/jpeg, Size: 1538042 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCH 0/2] iommu/vt-d: Fix PCI device reference count leak
@ 2022-11-21 11:36 Xiongfeng Wang
  2022-11-21 11:36 ` [PATCH 1/2] iommu/vt-d: Fix PCI device reference count leak in has_external pci() Xiongfeng Wang
  0 siblings, 1 reply; 14+ messages in thread
From: Xiongfeng Wang @ 2022-11-21 11:36 UTC (permalink / raw)
  To: dwmw2, baolu.lu, joro, will, robin.murphy, jroedel
  Cc: iommu, yangyingliang, wangxiongfeng2

for_each_pci_dev() is implemented by pci_get_device(). The comment of
pci_get_device() says that it will increase the reference count for the
returned pci_dev and also decrease the reference count for the input
pci_dev @from if it is not NULL.

If we break for_each_pci_dev() loop with pdev not NULL, we need to call
pci_dev_put() to decrease the reference count.

Xiongfeng Wang (2):
  iommu/vt-d: Fix PCI device reference count leak in has_external pci()
  iommu/vt-d: Fix PCI device reference count leak in
    dmar_dev_scope_init()

 drivers/iommu/intel/dmar.c  | 1 +
 drivers/iommu/intel/iommu.c | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-02-13 20:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-25 12:11 [PATCH 1/2] iommu/vt-d: Fix PCI device reference count leak in has_external pci() Zeno Davatz
2022-12-25 13:16 ` Baolu Lu
2022-12-25 13:37   ` Zeno Davatz
2022-12-25 13:52     ` Baolu Lu
2022-12-25 14:03       ` Zeno Davatz
2022-12-25 14:26       ` Zeno Davatz
2022-12-25 18:56       ` Zeno Davatz
2022-12-25 13:40   ` Zeno Davatz
2022-12-26 13:29 ` [PATCH 1/2] iommu/vt-d: Fix PCI device reference count leak in has_external pci() #forregzbot Thorsten Leemhuis
2022-12-27  7:20   ` Baolu Lu
2022-12-27  7:37     ` [PATCH 1/2] iommu/vt-d: Fix PCI device reference count leak in has_external pci() Thorsten Leemhuis
2023-02-01 23:24   ` [PATCH 1/2] iommu/vt-d: Fix PCI device reference count leak in has_external pci() #forregzbot Bjorn Helgaas
2023-02-13 20:43     ` Bjorn Helgaas
  -- strict thread matches above, loose matches on Subject: below --
2022-11-21 11:36 [PATCH 0/2] iommu/vt-d: Fix PCI device reference count leak Xiongfeng Wang
2022-11-21 11:36 ` [PATCH 1/2] iommu/vt-d: Fix PCI device reference count leak in has_external pci() Xiongfeng Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).