summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/libxed.py
diff options
context:
space:
mode:
authorRuoyu Wang <ruoyuw560@gmail.com>2026-08-20 21:56:11 +0800
committerWill Deacon <will@kernel.org>2026-10-04 17:19:37 +0000
commit3a4067658363e34bf4e1d7039e5b52951fcb4012 (patch)
treeeac5ad43c59577f88aa407f2b7e3f9b30be3f1fc /tools/perf/scripts/python/libxed.py
parent8f8301eaa400d38c9e6ff7884cad777be64969b4 (diff)
perf/dwc_pcie: Fix PCI device reference leak in probe
pci_get_domain_bus_and_slot() returns a referenced PCI device. When the subsequent RAS DES capability lookup fails, dwc_pcie_pmu_probe() returns -ENODEV without releasing that reference. Repeated failed probes can therefore keep the PCI device allocated after removal. Declare the looked-up device with __free(pci_dev_put), so the temporary reference is released on every return path. Keeping the reference scoped to the whole probe also covers all later uses of the device during initialization. This issue was found by a static analysis checker and confirmed by manual source review. Fixes: 7f35b429802a ("perf/dwc_pcie: fix duplicate pci_dev devices") Suggested-by: Markus Elfring <Markus.Elfring@web.de> Signed-off-by: Ruoyu Wang <ruoyuw560@gmail.com> Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions