Bug#1121211: UBSAN: array-index-out-of-bounds in /build/reproducible-path/linux-6.17.8/drivers/clk/samsung/clk-exynos-clkout.c:178:18
Jochen Sprickerhof
jspricke at debian.org
Sun Nov 23 12:33:47 PST 2025
Hi Nathan,
* Nathan Chancellor <nathan at kernel.org> [2025-11-22 13:38]:
>I bet it is the same problem as the ones I fixed in
>
> 6dc445c19050 ("clk: bcm: rpi: Assign ->num before accessing ->hws")
> 9368cdf90f52 ("clk: bcm: dvp: Assign ->num before accessing ->hws")
>
>So something like this?
>
>Cheers,
>Nathan
>
>diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c
>index 5f1a4f5e2e59..5b21025338bd 100644
>--- a/drivers/clk/samsung/clk-exynos-clkout.c
>+++ b/drivers/clk/samsung/clk-exynos-clkout.c
>@@ -175,6 +175,7 @@ static int exynos_clkout_probe(struct platform_device *pdev)
> clkout->mux.shift = EXYNOS_CLKOUT_MUX_SHIFT;
> clkout->mux.lock = &clkout->slock;
>
>+ clkout->data.num = EXYNOS_CLKOUT_NR_CLKS;
> clkout->data.hws[0] = clk_hw_register_composite(NULL, "clkout",
> parent_names, parent_count, &clkout->mux.hw,
> &clk_mux_ops, NULL, NULL, &clkout->gate.hw,
>@@ -185,7 +186,6 @@ static int exynos_clkout_probe(struct platform_device *pdev)
> goto err_unmap;
> }
>
>- clkout->data.num = EXYNOS_CLKOUT_NR_CLKS;
> ret = of_clk_add_hw_provider(clkout->np, of_clk_hw_onecell_get, &clkout->data);
> if (ret)
> goto err_clk_unreg;
>
This fixes it for me, feel free to add a
Tested-by: Jochen Sprickerhof <jochen at sprickerhof.de>
Thanks!
Jochen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20251123/ecb0926a/attachment.sig>
More information about the linux-arm-kernel
mailing list