Miaoqian Lin
6741f90220
cpufreq: nforce2: fix reference count leak in nforce2
...
commit 9600156bb9 upstream.
There are two reference count leaks in this driver:
1. In nforce2_fsb_read(): pci_get_subsys() increases the reference count
of the PCI device, but pci_dev_put() is never called to release it,
thus leaking the reference.
2. In nforce2_detect_chipset(): pci_get_subsys() gets a reference to the
nforce2_dev which is stored in a global variable, but the reference
is never released when the module is unloaded.
Fix both by:
- Adding pci_dev_put(nforce2_sub5) in nforce2_fsb_read() after reading
the configuration.
- Adding pci_dev_put(nforce2_dev) in nforce2_exit() to release the
global device reference.
Found via static analysis.
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Miaoqian Lin <linmq006@gmail.com >
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2026-01-11 15:21:58 +01:00
..
2025-06-19 15:27:59 +02:00
2022-11-30 19:50:04 +01:00
2021-12-30 18:51:39 +01:00
2022-03-09 19:53:01 +01:00
2023-08-28 14:12:05 +02:00
2026-01-11 15:21:22 +01:00
2025-05-02 07:50:42 +02:00
2025-08-28 16:28:32 +02:00
2023-07-20 16:01:57 +05:30
2022-08-30 13:49:23 +05:30
2024-06-12 11:11:45 +02:00
2025-10-23 16:16:26 +02:00
2022-03-10 19:55:05 +01:00
2022-02-04 19:22:34 +01:00
2025-04-10 14:37:25 +02:00
2022-04-13 15:22:41 +02:00
2025-05-09 09:43:53 +02:00
2019-06-19 17:09:55 +02:00
2020-11-10 18:31:17 +01:00
2020-11-10 18:31:17 +01:00
2023-11-28 17:20:00 +00:00
2020-07-02 13:03:30 +02:00
2026-01-11 15:21:42 +01:00
2024-04-03 15:28:35 +02:00
2020-03-12 15:43:52 +05:30
2026-01-11 15:21:58 +01:00
2025-10-02 13:42:49 +02:00
2023-07-20 16:02:13 +05:30
2020-10-27 18:42:54 +01:00
2020-03-24 21:31:27 +01:00
2025-05-09 09:43:53 +02:00
2020-01-27 10:33:33 +01:00
2022-09-26 11:15:04 +05:30
2021-03-19 17:26:20 +01:00
2023-12-08 08:52:24 +01:00
2023-07-20 16:02:13 +05:30
2025-10-19 16:30:49 +02:00
2025-02-27 04:10:45 -08:00
2024-03-26 18:19:30 -04:00
2019-11-29 11:52:02 +01:00
2023-06-21 18:44:56 +02:00
2023-07-20 16:02:13 +05:30
2025-11-24 10:29:18 +01:00
2019-05-30 11:26:39 -07:00
2020-03-24 21:31:27 +01:00
2024-12-09 10:32:14 +01:00
2023-02-21 12:13:58 -08:00
2023-04-13 17:46:35 -05:00
2024-12-09 10:32:48 +01:00
2023-08-11 06:15:21 +05:30
2022-06-10 14:51:35 +02:00
2023-07-20 16:02:14 +05:30
2020-08-23 17:36:59 -05:00
2022-04-13 17:18:45 +02:00
2023-08-29 20:41:29 +02:00
2023-04-27 10:09:05 -07:00
2023-04-13 17:46:35 -05:00
2020-03-24 21:31:27 +01:00
2020-03-24 21:31:27 +01:00
2019-05-30 11:26:39 -07:00
2023-08-28 12:27:30 +05:30
2019-06-05 17:37:08 +02:00
2021-10-05 16:33:05 +02:00
2019-05-30 11:26:32 -07:00
2023-07-20 16:01:57 +05:30
2023-07-20 16:01:57 +05:30
2019-08-26 10:02:01 +02:00
2022-05-07 22:55:49 +02:00
2022-05-07 22:55:49 +02:00
2025-02-08 09:51:54 +01:00
2024-08-11 12:47:14 +02:00
2023-07-20 16:02:13 +05:30
2023-07-20 16:02:13 +05:30
2025-02-17 09:40:14 +01:00
2026-01-11 15:21:42 +01:00
2023-01-12 10:53:12 +01:00
2021-05-21 18:52:13 +02:00
2025-10-15 11:57:50 +02:00
2025-05-02 07:50:42 +02:00
2021-09-02 18:04:17 +02:00
2023-07-12 12:45:18 +02:00
2023-07-12 12:45:18 +02:00
2023-04-13 17:46:35 -05:00
2020-03-24 21:31:27 +01:00
2020-03-24 21:31:27 +01:00
2020-10-28 18:04:07 +01:00
2019-05-30 11:26:39 -07:00
2020-03-24 21:31:27 +01:00
2023-07-20 16:01:57 +05:30
2023-07-20 16:02:12 +05:30
2023-04-27 10:09:05 -07:00
2023-04-27 10:09:05 -07:00
2025-11-24 10:29:48 +01:00
2023-11-20 11:58:57 +01:00
2024-10-04 16:28:54 +02:00
2023-07-20 16:02:12 +05:30