diff options
| author | Miaoqian Lin <linmq006@gmail.com> | 2025-10-27 23:04:45 +0800 |
|---|---|---|
| committer | Viresh Kumar <viresh.kumar@linaro.org> | 2025-10-28 10:28:13 +0530 |
| commit | 9600156bb99852c216a2128cdf9f114eb67c350f (patch) | |
| tree | 424368d050a598453fdbfb23c5acbbe8cc47d9db /tools/docs/parse-headers.py | |
| parent | 85976d3774be8fe290eb0468c1b0a0c36f40cbfe (diff) | |
cpufreq: nforce2: fix reference count leak in nforce2
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: 1da177e4c3f4 ("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>
Diffstat (limited to 'tools/docs/parse-headers.py')
0 files changed, 0 insertions, 0 deletions
