[PATCH 05/12] clk: samsung: exynos5250: Terminate PLL rate table with sentinel
From: Lee Jones
Date: Fri Nov 27 2026 - 13:05:11 EST
_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, apll_24mhz_tbl 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 apll_24mhz_tbl.
Fixes: f521ac8b390c ("clk: exynos5250: register APLL rate table")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Lee Jones <lee@xxxxxxxxxx>
---
drivers/clk/samsung/clk-exynos5250.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/samsung/clk-exynos5250.c b/drivers/clk/samsung/clk-exynos5250.c
index 802300c945a9..bce5b03ecd2f 100644
--- a/drivers/clk/samsung/clk-exynos5250.c
+++ b/drivers/clk/samsung/clk-exynos5250.c
@@ -730,6 +730,7 @@ static const struct samsung_pll_rate_table apll_24mhz_tbl[] __initconst = {
PLL_35XX_RATE(24 * MHZ, 400000000, 100, 3, 1),
PLL_35XX_RATE(24 * MHZ, 300000000, 200, 4, 2),
PLL_35XX_RATE(24 * MHZ, 200000000, 100, 3, 2),
+ { /* sentinel */ }
};
static struct samsung_pll_clock exynos5250_plls[nr_plls] __initdata = {
--
2.56.1.839.g22a8290db9-goog