linux/drivers/clk/visconti
Geert Uytterhoeven 39c0e6c844
clk: visconti: Make sure clk_init_data is fully initialized
The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

visconti_clk_register_gate() fills in init.parent_data, and assumes that
init.parent_names is NULL.  However, the latter in uninitialized, and
thus may cause a crash.

Make sure all members are fully initialized, to fix such bugs, and to
avoid future breakage when converting drivers to a different method for
specifying the parents.

Fixes: b4cbe606dc ("clk: visconti: Add support common clock driver and reset driver")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Reviewed-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@mail.toshiba>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2026-08-19 22:57:32 -07:00
..
clkc-tmpv770x.c clk: visconti: Add VIIF clocks 2025-11-20 18:53:32 -08:00
clkc.c clk: visconti: Make sure clk_init_data is fully initialized 2026-08-19 22:57:32 -07:00
clkc.h clk: visconti: prevent array overflow in visconti_clk_register_gates() 2022-03-17 12:21:28 -07:00
Kconfig clk: visconti: Add support common clock driver and reset driver 2022-01-05 17:12:31 -08:00
Makefile clk: visconti: Add support common clock driver and reset driver 2022-01-05 17:12:31 -08:00
pll-tmpv770x.c clk: visconti: Do not define number of clocks in bindings 2025-11-20 18:53:03 -08:00
pll.c clk: visconti: pll: use kzalloc_flex 2026-04-28 18:43:37 -07:00
pll.h clk: visconti: Fix undefined behavior bug in struct visconti_pll_provider 2023-10-23 19:40:20 -07:00
reset.c clk: visconti: Add support common clock driver and reset driver 2022-01-05 17:12:31 -08:00
reset.h clk: visconti: Add support common clock driver and reset driver 2022-01-05 17:12:31 -08:00