diff options
| author | blaze <1466528493@qq.com> | 2026-09-09 12:42:59 +0800 |
|---|---|---|
| committer | Vineet Gupta <vgupta@kernel.org> | 2026-09-09 14:31:11 +0530 |
| commit | d12c6a6f0c8fd5b5b41120f7be319f743dae3b4f (patch) | |
| tree | 55f5e8f121ec80fb5c99df594cbf2d2afa4e3bec /tools/lib/python/kdoc/python_version.py | |
| parent | 04eb7b5e043fbccf83d27a9be5c3973c2dbb110f (diff) | |
| download | linux-next-d12c6a6f0c8fd5b5b41120f7be319f743dae3b4f.tar.gz linux-next-d12c6a6f0c8fd5b5b41120f7be319f743dae3b4f.zip | |
arc: kernel: Fix clk reference leak in show_cpuinfo()
In show_cpuinfo(), clk_get() acquires a reference to the CPU clock, but
clk_put() is never called to release it. Since show_cpuinfo() is the
seq_file show callback for /proc/cpuinfo, this causes a clock reference
count leak every time /proc/cpuinfo is read.
The frequency is extracted via clk_get_rate() into a local variable, so
the clock reference can be safely released immediately after.
Fix this by calling clk_put(cpu_clk) right after clk_get_rate().
Fixes: 98f2892607c5 ("ARC: [cpuinfo] Add clk info in /proc/cpuinfo")
Signed-off-by: blaze <1466528493@qq.com>
Signed-off-by: Vineet Gupta <vgupta@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
