diff options
| author | Wentao Liang <vulab@iscas.ac.cn> | 2026-09-16 17:05:11 +0000 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2026-09-16 17:25:50 -0700 |
| commit | 88f113634028ca90a857031837d8061d1a9e1a7b (patch) | |
| tree | af2e810cc2be0affa46abde8825cd9525142ad0b /tools/perf/scripts/python | |
| parent | fd73f4a6659897191fa0d40695fe370925dd3780 (diff) | |
| download | linux-next-88f113634028ca90a857031837d8061d1a9e1a7b.tar.gz linux-next-88f113634028ca90a857031837d8061d1a9e1a7b.zip | |
watchdog: sp5100_tco: Fix pci_dev reference leak in sp5100_tco_init()
sp5100_tco_init() stores the PCI device matched by for_each_pci_dev()
in the global sp5100_tco_pci and keeps its reference for the lifetime
of the driver, but neither sp5100_tco_exit() nor the error paths of
sp5100_tco_init() call pci_dev_put(), leaking the reference on driver
registration failure and on every module load/unload cycle.
Drop the reference when the platform driver or device registration
fails and when the module is unloaded.
Fixes: 15e28bf13008 ("watchdog: Add support for sp5100 chipset TCO")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20260916170511.2086199-1-vulab@iscas.ac.cn
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
