[PATCH 2/2] clk: exynos: do not reparent requested clock

Kaustabh Chakraborty kauschluss at disroot.org
Mon Jan 19 18:00:24 CET 2026


On 2026-01-15 05:11 +02:00, chiffathefox wrote:
> It would appear the original developer of this driver
> reparented child clock devices to fix the issue described in
> `clk: clk_resolve_parent_clk(): resolve external clocks by id`.
> This hacky fix was the cause of invalid memory access when calling
> clk_get_rate() on a clock retrieved via clk_get_by_index().
> clk_get_by_index() returns a copy of the `struct clk` and
> when passed to clk_get_rate() it may be forwarded to
> clk_divider_recalc_rate(), which will cause the latter to
> run container_of() on a pointer from caller's stack instead
> of the pointer that was kzalloc()'d by the clk-divider driver.
>
> Signed-off-by: chiffathefox <chiffathefoxx at gmail.com>

Tested-by: Kaustabh Chakraborty <kauschluss at disroot.org> # exynos-mobile/exynos7870


More information about the U-Boot mailing list