summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-report
diff options
context:
space:
mode:
authorNiklas Schnelle <schnelle@linux.ibm.com>2026-09-16 17:14:10 +0200
committerHeiko Carstens <hca@linux.ibm.com>2026-09-22 12:21:04 +0200
commit09b7040a1b79f4f61cdad6d9af972e045bb7c498 (patch)
tree8316d29c8447a8b9f10068a86324a61efc213920 /tools/perf/scripts/python/bin/stackcollapse-report
parent9590f4d83880dfb5a81906e48e72779248fbe8f0 (diff)
downloadlinux-next-09b7040a1b79f4f61cdad6d9af972e045bb7c498.tar.gz
linux-next-09b7040a1b79f4f61cdad6d9af972e045bb7c498.zip
s390/pci: Fix leak of struct pci_dev reference in zpci_report_status()
In zpci_report_status(), a reference to the pdev associated with the zdev being reported about is acquired using pci_get_slot(). This reference needs to be dropped with pci_dev_put(), but this call is missing, thus leaking the reference. On subsequent hot unplug, this will cause the struct pci_dev to not be released, leaking memory and preventing reattach. At the same time, the only existing caller already holds a pdev reference. So instead of reacquiring and then dropping another reference, simply pass the existing pdev pointer to zpci_report_status(). This gets rid of the need for pci_get_slot() as well as the zdev->zbus check. Cc: stable@vger.kernel.org Fixes: 4ec6054e7321 ("s390/pci: Report PCI error recovery results via SCLP") Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Reviewed-by: Benjamin Block <bblock@linux.ibm.com> Reviewed-by: Farhan Ali <alifm@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions