[PATCH 07/12] clk: samsung: exynos5410: Terminate PLL rate table with sentinel

Lee Jones lee at kernel.org
Fri Nov 27 10:03:15 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, exynos5410_pll2550x_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 exynos5410_pll2550x_24mhz_tbl.

Fixes: be95d2c7d918 ("clk: samsung: Add support for EPLL on exynos5410")
Cc: stable at vger.kernel.org
Signed-off-by: Lee Jones <lee at kernel.org>
---
 drivers/clk/samsung/clk-exynos5410.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/samsung/clk-exynos5410.c b/drivers/clk/samsung/clk-exynos5410.c
index baa9988c7bb7..0036544bd77d 100644
--- a/drivers/clk/samsung/clk-exynos5410.c
+++ b/drivers/clk/samsung/clk-exynos5410.c
@@ -235,6 +235,7 @@ static const struct samsung_pll_rate_table exynos5410_pll2550x_24mhz_tbl[] __ini
 	PLL_36XX_RATE(24 * MHZ, 133000000U, 266, 3, 4, 0),
 	PLL_36XX_RATE(24 * MHZ, 100000000U, 200, 3, 4, 0),
 	PLL_36XX_RATE(24 * MHZ, 66000000U,  176, 2, 5, 0),
+	{ /* sentinel */ }
 };
 
 static struct samsung_pll_clock exynos5410_plls[nr_plls] __initdata = {
-- 
2.56.1.839.g22a8290db9-goog




More information about the linux-arm-kernel mailing list