linux/drivers/clk/ti
Geert Uytterhoeven 3ae1674975
clk: ti: 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.

_register_mux() fills in init.parent_data, and assumes that
init.parent_names is NULL.  However, the latter is 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: 667f420c09 ("clk: ti: mux: resolve parent clocks by DT index, not by name")
Closes: https://lore.kernel.org/CAMuHMdU3yVqoyHC4eNF2NuYo8wy+6ODLoYat4R71X99Mxc_=kw@mail.gmail.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Reviewed-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
History 2026-08-19 22:55:18 -07:00
..
adpll.c clk: ti: Make sure clk_init_data is fully initialized 2026-08-19 22:55:18 -07:00
apll.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
autoidle.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
clk-2xxx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
clk-3xxx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
clk-7xx.c clk: ti: Drop legacy compatibility clocks for dra7 2022-03-15 14:07:27 -07:00
clk-33xx.c clk: ti: am33xx: keep WKUP_DEBUGSS_CLKCTRL enabled 2025-09-19 22:27:48 -07:00
clk-43xx.c clk: Fix typos 2025-07-26 23:49:18 -07:00
clk-44xx.c clk: ti: Fix missing omap4 mcbsp functional clock and aliases 2023-10-13 11:01:48 +03:00
clk-54xx.c clk: ti: Fix missing omap5 mcbsp functional clock and aliases 2023-10-13 11:02:02 +03:00
clk-814x.c clk: ti: Fix dm814x clkctrl for ethernet 2020-03-17 09:45:24 -07:00
clk-816x.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
clk-dra7-atl.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
clk.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
clkctrl.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
clkt_dflt.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_320.RULE 2022-06-10 14:51:36 +02:00
clkt_dpll.c clk: ti: dpll: convert from round_rate() to determine_rate() 2025-09-08 12:50:55 -04:00
clkt_iclk.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
clock.h clk: ti: dpll: convert from round_rate() to determine_rate() 2025-09-08 12:50:55 -04:00
clockdomain.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_320.RULE 2022-06-10 14:51:36 +02:00
composite.c clk: ti: composite: resolve parent clocks by DT index, not by name 2026-08-17 09:28:18 -07:00
divider.c clk: ti: Make sure clk_init_data is fully initialized 2026-08-19 22:55:18 -07:00
dpll.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dpll3xxx.c clk: ti: dpll: convert from round_rate() to determine_rate() 2025-09-08 12:50:55 -04:00
dpll44xx.c clk: ti: dpll: convert from round_rate() to determine_rate() 2025-09-08 12:50:55 -04:00
fapll.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
fixed-factor.c clk: ti: change ti_clk_register[_omap_hw]() API 2022-11-22 17:01:47 -08:00
gate.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
interface.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile clk: ti: Drop legacy compatibility clocks for dra7 2022-03-15 14:07:27 -07:00
mux.c clk: ti: Make sure clk_init_data is fully initialized 2026-08-19 22:55:18 -07:00