linux-stable/drivers/iommu/amd
Yang Yingliang 902cc25070 iommu/amd: Fix pci device refcount leak in ppr_notifier()
[ Upstream commit 6cf0981c22 ]

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: daae2d25a4 ("iommu/amd: Don't copy GCR3 table root pointer")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221118093604.216371-1-yangyingliang@huawei.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:26:33 +01:00
..
amd_iommu.h iommu/amd: Introduce function to check and enable SNP 2022-07-15 10:41:04 +02:00
amd_iommu_types.h iommu/amd: Add support for AVIC when SNP is enabled 2022-07-29 10:31:06 +02:00
debugfs.c
init.c iommu/amd: Fix compile warning in init code 2022-07-29 12:06:14 +02:00
io_pgtable.c iommu/amd: Use try_cmpxchg64 in alloc_pte and free_clear_pte 2022-06-23 09:43:31 +02:00
iommu.c iommu/amd: use full 64-bit value in build_completion_wait() 2022-09-07 10:39:51 +02:00
iommu_v2.c iommu/amd: Fix pci device refcount leak in ppr_notifier() 2022-12-31 13:26:33 +01:00
Kconfig iommu/amd: Prepare for generic IO page table framework 2021-01-28 16:51:17 +01:00
Makefile iommu/amd: Prepare for generic IO page table framework 2021-01-28 16:51:17 +01:00
quirks.c iommu/amd: Include PCI segment ID when initialize IOMMU 2022-07-07 09:37:51 +02:00