summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorRuoyu Wang <ruoyuw560@gmail.com>2026-08-20 21:56:03 +0800
committerJuergen Gross <jgross@suse.com>2026-10-09 09:58:45 +0200
commit5d12c51bd98cdb5a32cbfb606963b05740ec42f2 (patch)
treed716bf0a54eaf502843ec86274535c63b757e9bf /tools/perf/scripts/python
parenta90ee4305c4a5df72c11b31dacfdc76e00fcf78a (diff)
downloadlinux-5d12c51bd98cdb5a32cbfb606963b05740ec42f2.tar.gz
linux-5d12c51bd98cdb5a32cbfb606963b05740ec42f2.zip
xen/pcifront: Fix PCI device reference leak in AER handling
pci_get_domain_bus_and_slot() increments the reference count of the returned PCI device. pcifront_common_process() drops that reference only when the device or its driver is missing. All paths for a bound device either return directly after invoking an error recovery callback or fall through without calling pci_dev_put(). Consequently, each AER request for a bound device leaks a reference and can keep the device allocated after removal. Declare the looked-up device with __free(pci_dev_put), so every return path releases the reference after callback dispatch. This keeps the device alive while its callback runs and balances the lookup without restructuring the callback returns. This issue was found by a static analysis checker and confirmed by manual source review. Fixes: 956a9202cd12 ("xen-pcifront: Xen PCI frontend driver.") Suggested-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Ruoyu Wang <ruoyuw560@gmail.com> Reviewed-by: Lukas Wunner <lukas@wunner.de> Link: https://lore.kernel.org/r/20260813153138.3953222-1-ruoyuw560@gmail.com/ Signed-off-by: Juergen Gross <jgross@suse.com> Message-ID: <20260820135603.3901798-1-ruoyuw560@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions