Files
blaze d12c6a6f0c 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 <[email protected]>
Signed-off-by: Vineet Gupta <[email protected]>
2026-09-09 14:31:11 +05:30
..
2024-04-01 18:40:39 -07:00
2024-04-01 18:40:39 -07:00
…
2024-04-01 18:40:39 -07:00
…
…
…
2024-04-01 18:40:39 -07:00
2026-09-09 14:28:23 +05:30
2024-07-10 14:23:38 +02:00