diff options
| author | Haotian Zhang <vulab@iscas.ac.cn> | 2026-10-09 01:24:42 +0800 |
|---|---|---|
| committer | Viresh Kumar <viresh.kumar@linaro.org> | 2026-10-09 10:02:39 +0530 |
| commit | 6fa50b1988b8dfd2e92a9cecba073fe4347a5e23 (patch) | |
| tree | 12cc3dc5a42e54368bc61cf1ad49e3bbfc770927 /kernel | |
| parent | 95cc3927ce26cadc325833a16b13c2a3c08353de (diff) | |
| download | linux-next-6fa50b1988b8dfd2e92a9cecba073fe4347a5e23.tar.gz linux-next-6fa50b1988b8dfd2e92a9cecba073fe4347a5e23.zip | |
cpufreq: qcom-cpufreq-hw: fix device node refcount leak in phandle parsing
of_parse_phandle_with_args() transfers a reference to the provider node
in out_args->np, which the caller is responsible for releasing with
of_node_put(). Neither qcom_get_related_cpus() nor
qcom_cpufreq_hw_cpu_init() ever puts args.np: they only put cpu_np, which
is a different node obtained from of_cpu_device_node_get(). The
reference is therefore leaked on every successful call, and
qcom_get_related_cpus() leaks one per present CPU.
Release args.np after the parsed index has been read in both call sites.
Fixes: 2849dd8bc72b ("cpufreq: qcom-hw: Add support for QCOM cpufreq HW driver")
Assisted-by: DeepSeek-V4.1-Flash
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions
