[PATCH 11/12] clk: samsung: exynosautov920: Terminate PLL rate table with sentinel

Lee Jones lee at kernel.org
Fri Nov 27 10:03:19 PST 2026


_samsung_clk_register_pll() sizes each PLL rate table by scanning until
it encounters an entry with .rate == 0, then copies the counted entries
into pll->rate_table.  However, cpu_pll_rates omits a terminating zero
sentinel, causing out-of-bounds reads into adjacent read-only data and
populating pll->rate_table with bogus entries.

Append a sentinel entry to cpu_pll_rates.

Fixes: 59636ec89c2c ("clk: samsung: exynosautov920: add cpucl0 clock support")
Cc: stable at vger.kernel.org
Signed-off-by: Lee Jones <lee at kernel.org>
---
 drivers/clk/samsung/clk-exynosautov920.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/samsung/clk-exynosautov920.c b/drivers/clk/samsung/clk-exynosautov920.c
index a938f3cc7b57..7c4e9ab25624 100644
--- a/drivers/clk/samsung/clk-exynosautov920.c
+++ b/drivers/clk/samsung/clk-exynosautov920.c
@@ -1077,6 +1077,7 @@ static const struct samsung_pll_rate_table cpu_pll_rates[] __initconst = {
 	PLL_35XX_RATE(38400000U, 1152000000U, 120, 4, 0),
 	PLL_35XX_RATE(38400000U, 576000000U, 120, 4, 1),
 	PLL_35XX_RATE(38400000U, 288000000U, 120, 4, 2),
+	{ /* sentinel */ }
 };
 
 static const struct samsung_pll_clock cpucl0_pll_clks[] __initconst = {
-- 
2.56.1.839.g22a8290db9-goog




More information about the linux-arm-kernel mailing list