diff options
| author | Yang Yingliang <[email protected]> | 2022-12-01 04:01:25 +0000 |
|---|---|---|
| committer | Joerg Roedel <[email protected]> | 2022-12-02 10:45:32 +0000 |
| commit | 6927d352380797ddbee18631491ec428741696e2 (patch) | |
| tree | 563f48eead2d51af123511262616365ddc87d036 /lib/debugobjects.c | |
| parent | iommu/vt-d: Add a fix for devices need extra dtlb flush (diff) | |
| download | kernel-6927d352380797ddbee18631491ec428741696e2.tar.gz kernel-6927d352380797ddbee18631491ec428741696e2.zip | |
iommu/vt-d: Fix PCI device refcount leak in prq_event_thread()
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 decrease
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 <[email protected]>
Signed-off-by: Yang Yingliang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Lu Baolu <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions
