[PATCH 03/12] clk: samsung: artpec8: Terminate PLL rate table with sentinel

From: Lee Jones

Date: Fri Nov 27 2026 - 13:04:51 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, artpec8_pll_audio_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 artpec8_pll_audio_rates.

Fixes: bd5336e3f704 ("clk: samsung: artpec-8: Add initial clock support for ARTPEC-8 SoC")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Lee Jones <lee@xxxxxxxxxx>
---
drivers/clk/samsung/clk-artpec8.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/samsung/clk-artpec8.c b/drivers/clk/samsung/clk-artpec8.c
index 0ea7c8b58674..fd35643be2e3 100644
--- a/drivers/clk/samsung/clk-artpec8.c
+++ b/drivers/clk/samsung/clk-artpec8.c
@@ -173,6 +173,7 @@ static const struct samsung_pll_rate_table artpec8_pll_audio_rates[] __initconst
PLL_36XX_RATE(25 * MHZ, 100000000U, 32, 2, 2, 0),
PLL_36XX_RATE(25 * MHZ, 98303985U, 47, 3, 2, 12184),
PLL_36XX_RATE(25 * MHZ, 49151992U, 47, 3, 3, 12184),
+ { /* sentinel */ }
};

static const struct samsung_pll_clock cmu_cmu_pll_clks[] __initconst = {
--
2.56.1.839.g22a8290db9-goog