* [PATCH v2] cpufreq: qcom-nvmem: add sentinel to qcom_cpufreq_ipq806x_match_list
@ 2026-01-22 1:44 xiaopeitux
2026-01-22 7:30 ` Viresh Kumar
2026-01-22 11:41 ` Konrad Dybcio
0 siblings, 2 replies; 3+ messages in thread
From: xiaopeitux @ 2026-01-22 1:44 UTC (permalink / raw)
To: konrad.dybcio, ilia.lin, linux-pm, linux-arm-msm, linux-kernel,
rafael, viresh.kumar
Cc: Pei Xiao
From: Pei Xiao <xiaopei01@kylinos.cn>
The of_device_id table is expected to be NULL-terminated. Without the
sentinel, the traversal of the array can lead to out-of-bound access,
causing undefined behavior.
This adds the missing sentinel to the qcom_cpufreq_ipq806x_match_list
array.
Fixes: 58f5d39d5ed8 ("cpufreq: qcom-nvmem: add compatible fallback for ipq806x for no SMEM")
Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
---
changlog in v2:
Remove the extra commas
---
drivers/cpufreq/qcom-cpufreq-nvmem.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/cpufreq/qcom-cpufreq-nvmem.c b/drivers/cpufreq/qcom-cpufreq-nvmem.c
index 81e16b5a0245..b8081acba928 100644
--- a/drivers/cpufreq/qcom-cpufreq-nvmem.c
+++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c
@@ -263,6 +263,7 @@ static const struct of_device_id qcom_cpufreq_ipq806x_match_list[] __maybe_unuse
{ .compatible = "qcom,ipq8066", .data = (const void *)QCOM_ID_IPQ8066 },
{ .compatible = "qcom,ipq8068", .data = (const void *)QCOM_ID_IPQ8068 },
{ .compatible = "qcom,ipq8069", .data = (const void *)QCOM_ID_IPQ8069 },
+ { /* sentinel */ }
};
static int qcom_cpufreq_ipq8064_name_version(struct device *cpu_dev,
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] cpufreq: qcom-nvmem: add sentinel to qcom_cpufreq_ipq806x_match_list
2026-01-22 1:44 [PATCH v2] cpufreq: qcom-nvmem: add sentinel to qcom_cpufreq_ipq806x_match_list xiaopeitux
@ 2026-01-22 7:30 ` Viresh Kumar
2026-01-22 11:41 ` Konrad Dybcio
1 sibling, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2026-01-22 7:30 UTC (permalink / raw)
To: rafael, xiaopeitux
Cc: konrad.dybcio, ilia.lin, linux-pm, linux-arm-msm, linux-kernel, Pei Xiao
On 22-01-26, 09:44, xiaopeitux@foxmail.com wrote:
> From: Pei Xiao <xiaopei01@kylinos.cn>
>
> The of_device_id table is expected to be NULL-terminated. Without the
> sentinel, the traversal of the array can lead to out-of-bound access,
> causing undefined behavior.
>
> This adds the missing sentinel to the qcom_cpufreq_ipq806x_match_list
> array.
>
> Fixes: 58f5d39d5ed8 ("cpufreq: qcom-nvmem: add compatible fallback for ipq806x for no SMEM")
> Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
> ---
> changlog in v2:
> Remove the extra commas
> ---
> drivers/cpufreq/qcom-cpufreq-nvmem.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/cpufreq/qcom-cpufreq-nvmem.c b/drivers/cpufreq/qcom-cpufreq-nvmem.c
> index 81e16b5a0245..b8081acba928 100644
> --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c
> +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c
> @@ -263,6 +263,7 @@ static const struct of_device_id qcom_cpufreq_ipq806x_match_list[] __maybe_unuse
> { .compatible = "qcom,ipq8066", .data = (const void *)QCOM_ID_IPQ8066 },
> { .compatible = "qcom,ipq8068", .data = (const void *)QCOM_ID_IPQ8068 },
> { .compatible = "qcom,ipq8069", .data = (const void *)QCOM_ID_IPQ8069 },
> + { /* sentinel */ }
> };
>
> static int qcom_cpufreq_ipq8064_name_version(struct device *cpu_dev,
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Rafael, can you take this directly for rc7 ?
--
viresh
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] cpufreq: qcom-nvmem: add sentinel to qcom_cpufreq_ipq806x_match_list
2026-01-22 1:44 [PATCH v2] cpufreq: qcom-nvmem: add sentinel to qcom_cpufreq_ipq806x_match_list xiaopeitux
2026-01-22 7:30 ` Viresh Kumar
@ 2026-01-22 11:41 ` Konrad Dybcio
1 sibling, 0 replies; 3+ messages in thread
From: Konrad Dybcio @ 2026-01-22 11:41 UTC (permalink / raw)
To: xiaopeitux, ilia.lin, linux-pm, linux-arm-msm, linux-kernel,
rafael, viresh.kumar
Cc: Pei Xiao
On 1/22/26 2:44 AM, xiaopeitux@foxmail.com wrote:
> From: Pei Xiao <xiaopei01@kylinos.cn>
>
> The of_device_id table is expected to be NULL-terminated. Without the
> sentinel, the traversal of the array can lead to out-of-bound access,
> causing undefined behavior.
>
> This adds the missing sentinel to the qcom_cpufreq_ipq806x_match_list
> array.
>
> Fixes: 58f5d39d5ed8 ("cpufreq: qcom-nvmem: add compatible fallback for ipq806x for no SMEM")
> Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
> ---
> changlog in v2:
> Remove the extra commas
> ---
Thanks for catching that
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-22 11:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-22 1:44 [PATCH v2] cpufreq: qcom-nvmem: add sentinel to qcom_cpufreq_ipq806x_match_list xiaopeitux
2026-01-22 7:30 ` Viresh Kumar
2026-01-22 11:41 ` Konrad Dybcio
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®