All of lore.kernel.org
 help / color / mirror / Atom feed
* [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
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ 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] 4+ messages in thread

end of thread, other threads:[~2022-12-01  4:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2022-11-21 11:36 ` [PATCH 2/2] iommu/vt-d: Fix PCI device reference count leak in dmar_dev_scope_init() Xiongfeng Wang
2022-12-01  4:04 ` [PATCH 0/2] iommu/vt-d: Fix PCI device reference count leak Baolu Lu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.