* [PATCH treewide 0/5] clk: Make sure clk_init_data is fully initialized (part 1)
@ 2026-08-19 19:05 Geert Uytterhoeven
2026-08-19 19:05 ` [PATCH treewide 1/5] clk: ti: Make sure clk_init_data is fully initialized Geert Uytterhoeven
` (4 more replies)
0 siblings, 5 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2026-08-19 19:05 UTC (permalink / raw)
To: Tero Kristo, Stephen Boyd, Brian Masney, Jerome Brunet,
Nobuhiro Iwamatsu, Nuno Sa, Guenter Roeck, Michael Hennerich,
Antoniu Miclaus, Jonathan Cameron, David Lechner, Andy Shevchenko,
Sunny Luo, Xianwei Zhao, Mark Brown, Kees Cook, Kevin Hilman,
Mathieu Dubois-Briand
Cc: linux-omap, linux-arm-kernel, linux-hwmon, linux, linux-iio,
linux-amlogic, linux-spi, linux-clk, linux-kernel,
Geert Uytterhoeven
Hi all,
The clk_init_data structure contains three mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need. When commit
fc0c209c147f35ed ("clk: Allow parents to be specified without string
names") added the last two methods, this was done in a
backwards-compatible way, using a priority-based scheme:
- .name, .ops, .num_parents, and .flags must always be initialized,
- if .num_parents is non-zero, .parent_names must be initialized,
- if .parent_names is NULL, .parent_data must be initialized,
- if .parent_data is NULL, .parent_hws must be initialized
and valid.
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.
Hence this series makes 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.
This (small) series is part 1, and fixes all cases that I identified to
be real bugs:
- The first patch fixes a crash I saw on BeagleBone Black,
- The other patches are only compile-tested.
All patches in this series can be applied independently.
Part 2 will be much larger (touching 185 files), and will fix the
remaining cases that are currently harmless.
Thanks for your comments!
Geert Uytterhoeven (5):
clk: ti: Make sure clk_init_data is fully initialized
clk: visconti: Make sure clk_init_data is fully initialized
hwmon: (ltc4282) Make sure clk_init_data is fully initialized
iio: frequency: adf4377: Make sure clk_init_data is fully initialized
spi: amlogic-spisg: Make sure clk_init_data is fully initialized
drivers/clk/ti/adpll.c | 4 ++--
drivers/clk/ti/divider.c | 2 +-
drivers/clk/ti/mux.c | 2 +-
drivers/clk/visconti/clkc.c | 2 +-
drivers/hwmon/ltc4282.c | 2 +-
drivers/iio/frequency/adf4377.c | 2 +-
drivers/spi/spi-amlogic-spisg.c | 2 +-
7 files changed, 8 insertions(+), 8 deletions(-)
--
2.43.0
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH treewide 1/5] clk: ti: Make sure clk_init_data is fully initialized
2026-08-19 19:05 [PATCH treewide 0/5] clk: Make sure clk_init_data is fully initialized (part 1) Geert Uytterhoeven
@ 2026-08-19 19:05 ` Geert Uytterhoeven
2026-08-19 21:21 ` Brian Masney
2026-08-19 19:05 ` [PATCH treewide 2/5] clk: visconti: " Geert Uytterhoeven
` (3 subsequent siblings)
4 siblings, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2026-08-19 19:05 UTC (permalink / raw)
To: Tero Kristo, Stephen Boyd, Brian Masney, Jerome Brunet,
Nobuhiro Iwamatsu, Nuno Sa, Guenter Roeck, Michael Hennerich,
Antoniu Miclaus, Jonathan Cameron, David Lechner, Andy Shevchenko,
Sunny Luo, Xianwei Zhao, Mark Brown, Kees Cook, Kevin Hilman,
Mathieu Dubois-Briand
Cc: linux-omap, linux-arm-kernel, linux-hwmon, linux, linux-iio,
linux-amlogic, linux-spi, linux-clk, linux-kernel,
Geert Uytterhoeven
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 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: 667f420c09f1417c ("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>
---
drivers/clk/ti/adpll.c | 4 ++--
drivers/clk/ti/divider.c | 2 +-
drivers/clk/ti/mux.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/ti/adpll.c b/drivers/clk/ti/adpll.c
index e305fcbac6475b03..8885d28face50beb 100644
--- a/drivers/clk/ti/adpll.c
+++ b/drivers/clk/ti/adpll.c
@@ -483,7 +483,7 @@ static const struct clk_ops ti_adpll_ops = {
static int ti_adpll_init_dco(struct ti_adpll_data *d)
{
- struct clk_init_data init;
+ struct clk_init_data init = {};
struct clk *clock;
const char *postfix;
int width, err;
@@ -576,7 +576,7 @@ static int ti_adpll_init_clkout(struct ti_adpll_data *d,
struct clk *clk1)
{
struct ti_adpll_clkout_data *co;
- struct clk_init_data init;
+ struct clk_init_data init = {};
struct clk_ops *ops;
const char *parent_names[2];
const char *child_name;
diff --git a/drivers/clk/ti/divider.c b/drivers/clk/ti/divider.c
index af923b8cb0ed8fbc..3b438c2d68aacd7c 100644
--- a/drivers/clk/ti/divider.c
+++ b/drivers/clk/ti/divider.c
@@ -311,7 +311,7 @@ static struct clk *_register_divider(struct device_node *node,
u32 flags,
struct clk_omap_divider *div)
{
- struct clk_init_data init;
+ struct clk_init_data init = {};
const char *parent_name;
const char *name;
diff --git a/drivers/clk/ti/mux.c b/drivers/clk/ti/mux.c
index ded4432f7528cc6e..0fef60e82107a5a5 100644
--- a/drivers/clk/ti/mux.c
+++ b/drivers/clk/ti/mux.c
@@ -124,9 +124,9 @@ static struct clk *_register_mux(struct device_node *node, const char *name,
struct clk_omap_reg *reg, u8 shift, u32 mask,
s8 latch, u8 clk_mux_flags, u32 *table)
{
+ struct clk_init_data init = {};
struct clk_omap_mux *mux;
struct clk *clk;
- struct clk_init_data init;
/* allocate the mux */
mux = kzalloc_obj(*mux);
--
2.43.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH treewide 2/5] clk: visconti: Make sure clk_init_data is fully initialized
2026-08-19 19:05 [PATCH treewide 0/5] clk: Make sure clk_init_data is fully initialized (part 1) Geert Uytterhoeven
2026-08-19 19:05 ` [PATCH treewide 1/5] clk: ti: Make sure clk_init_data is fully initialized Geert Uytterhoeven
@ 2026-08-19 19:05 ` Geert Uytterhoeven
2026-08-19 21:21 ` Brian Masney
2026-08-19 19:05 ` [PATCH treewide 3/5] hwmon: (ltc4282) " Geert Uytterhoeven
` (2 subsequent siblings)
4 siblings, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2026-08-19 19:05 UTC (permalink / raw)
To: Tero Kristo, Stephen Boyd, Brian Masney, Jerome Brunet,
Nobuhiro Iwamatsu, Nuno Sa, Guenter Roeck, Michael Hennerich,
Antoniu Miclaus, Jonathan Cameron, David Lechner, Andy Shevchenko,
Sunny Luo, Xianwei Zhao, Mark Brown, Kees Cook, Kevin Hilman,
Mathieu Dubois-Briand
Cc: linux-omap, linux-arm-kernel, linux-hwmon, linux, linux-iio,
linux-amlogic, linux-spi, linux-clk, linux-kernel,
Geert Uytterhoeven
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: b4cbe606dc3674b2 ("clk: visconti: Add support common clock driver and reset driver")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
drivers/clk/visconti/clkc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/visconti/clkc.c b/drivers/clk/visconti/clkc.c
index d0b193b5d0b35f94..4018d1298880dfbb 100644
--- a/drivers/clk/visconti/clkc.c
+++ b/drivers/clk/visconti/clkc.c
@@ -81,9 +81,9 @@ static struct clk_hw *visconti_clk_register_gate(struct device *dev,
u8 rs_idx,
spinlock_t *lock)
{
+ struct clk_init_data init = {};
struct visconti_clk_gate *gate;
struct clk_parent_data *pdata;
- struct clk_init_data init;
struct clk_hw *hw;
int ret;
--
2.43.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH treewide 3/5] hwmon: (ltc4282) Make sure clk_init_data is fully initialized
2026-08-19 19:05 [PATCH treewide 0/5] clk: Make sure clk_init_data is fully initialized (part 1) Geert Uytterhoeven
2026-08-19 19:05 ` [PATCH treewide 1/5] clk: ti: Make sure clk_init_data is fully initialized Geert Uytterhoeven
2026-08-19 19:05 ` [PATCH treewide 2/5] clk: visconti: " Geert Uytterhoeven
@ 2026-08-19 19:05 ` Geert Uytterhoeven
2026-08-19 20:32 ` Guenter Roeck
2026-08-19 21:22 ` Brian Masney
2026-08-19 19:05 ` [PATCH treewide 4/5] iio: frequency: adf4377: " Geert Uytterhoeven
2026-08-19 19:05 ` [PATCH treewide 5/5] spi: amlogic-spisg: " Geert Uytterhoeven
4 siblings, 2 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2026-08-19 19:05 UTC (permalink / raw)
To: Tero Kristo, Stephen Boyd, Brian Masney, Jerome Brunet,
Nobuhiro Iwamatsu, Nuno Sa, Guenter Roeck, Michael Hennerich,
Antoniu Miclaus, Jonathan Cameron, David Lechner, Andy Shevchenko,
Sunny Luo, Xianwei Zhao, Mark Brown, Kees Cook, Kevin Hilman,
Mathieu Dubois-Briand
Cc: linux-omap, linux-arm-kernel, linux-hwmon, linux, linux-iio,
linux-amlogic, linux-spi, linux-clk, linux-kernel,
Geert Uytterhoeven
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.
ltc428_clk_provider_setup() does not fill in any parent clocks, and
assumes that init.num_parents 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: cbc29538dbf7d740 ("hwmon: Add driver for LTC4282")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
drivers/hwmon/ltc4282.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/ltc4282.c b/drivers/hwmon/ltc4282.c
index b1675dc5b3c7fd2f..54ba4b8542e94b7b 100644
--- a/drivers/hwmon/ltc4282.c
+++ b/drivers/hwmon/ltc4282.c
@@ -1106,7 +1106,7 @@ static const struct clk_ops ltc4282_ops = {
static int ltc428_clk_provider_setup(struct ltc4282_state *st,
struct device *dev)
{
- struct clk_init_data init;
+ struct clk_init_data init = {};
int ret;
if (!IS_ENABLED(CONFIG_COMMON_CLK))
--
2.43.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH treewide 4/5] iio: frequency: adf4377: Make sure clk_init_data is fully initialized
2026-08-19 19:05 [PATCH treewide 0/5] clk: Make sure clk_init_data is fully initialized (part 1) Geert Uytterhoeven
` (2 preceding siblings ...)
2026-08-19 19:05 ` [PATCH treewide 3/5] hwmon: (ltc4282) " Geert Uytterhoeven
@ 2026-08-19 19:05 ` Geert Uytterhoeven
2026-08-19 21:22 ` Brian Masney
2026-08-19 19:05 ` [PATCH treewide 5/5] spi: amlogic-spisg: " Geert Uytterhoeven
4 siblings, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2026-08-19 19:05 UTC (permalink / raw)
To: Tero Kristo, Stephen Boyd, Brian Masney, Jerome Brunet,
Nobuhiro Iwamatsu, Nuno Sa, Guenter Roeck, Michael Hennerich,
Antoniu Miclaus, Jonathan Cameron, David Lechner, Andy Shevchenko,
Sunny Luo, Xianwei Zhao, Mark Brown, Kees Cook, Kevin Hilman,
Mathieu Dubois-Briand
Cc: linux-omap, linux-arm-kernel, linux-hwmon, linux, linux-iio,
linux-amlogic, linux-spi, linux-clk, linux-kernel,
Geert Uytterhoeven
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.
adf4377_clk_register() 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: 60e5448ddbec2dc2 ("iio: frequency: adf4377: add clk provider support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
drivers/iio/frequency/adf4377.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/frequency/adf4377.c b/drivers/iio/frequency/adf4377.c
index 4dd19a9aa9943c57..f4eb9ba5878e1893 100644
--- a/drivers/iio/frequency/adf4377.c
+++ b/drivers/iio/frequency/adf4377.c
@@ -990,7 +990,7 @@ static int adf4377_clk_register(struct adf4377_state *st)
{
struct spi_device *spi = st->spi;
struct device *dev = &spi->dev;
- struct clk_init_data init;
+ struct clk_init_data init = {};
struct clk_parent_data parent_data;
int ret;
--
2.43.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH treewide 5/5] spi: amlogic-spisg: Make sure clk_init_data is fully initialized
2026-08-19 19:05 [PATCH treewide 0/5] clk: Make sure clk_init_data is fully initialized (part 1) Geert Uytterhoeven
` (3 preceding siblings ...)
2026-08-19 19:05 ` [PATCH treewide 4/5] iio: frequency: adf4377: " Geert Uytterhoeven
@ 2026-08-19 19:05 ` Geert Uytterhoeven
2026-08-19 21:23 ` Brian Masney
4 siblings, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2026-08-19 19:05 UTC (permalink / raw)
To: Tero Kristo, Stephen Boyd, Brian Masney, Jerome Brunet,
Nobuhiro Iwamatsu, Nuno Sa, Guenter Roeck, Michael Hennerich,
Antoniu Miclaus, Jonathan Cameron, David Lechner, Andy Shevchenko,
Sunny Luo, Xianwei Zhao, Mark Brown, Kees Cook, Kevin Hilman,
Mathieu Dubois-Briand
Cc: linux-omap, linux-arm-kernel, linux-hwmon, linux, linux-iio,
linux-amlogic, linux-spi, linux-clk, linux-kernel,
Geert Uytterhoeven
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.
aml_spisg_clk_init() 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: cef9991e04aed330 ("spi: Add Amlogic SPISG driver")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
drivers/spi/spi-amlogic-spisg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-amlogic-spisg.c b/drivers/spi/spi-amlogic-spisg.c
index afc8af04638d3b6e..9049a87e9d0f2df6 100644
--- a/drivers/spi/spi-amlogic-spisg.c
+++ b/drivers/spi/spi-amlogic-spisg.c
@@ -636,7 +636,7 @@ static int aml_spisg_target_abort(struct spi_controller *ctlr)
static int aml_spisg_clk_init(struct spisg_device *spisg, void __iomem *base)
{
struct device *dev = &spisg->pdev->dev;
- struct clk_init_data init;
+ struct clk_init_data init = {};
struct clk_divider *div;
struct clk_div_table *tbl;
char name[32];
--
2.43.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH treewide 3/5] hwmon: (ltc4282) Make sure clk_init_data is fully initialized
2026-08-19 19:05 ` [PATCH treewide 3/5] hwmon: (ltc4282) " Geert Uytterhoeven
@ 2026-08-19 20:32 ` Guenter Roeck
2026-08-19 21:22 ` Brian Masney
1 sibling, 0 replies; 12+ messages in thread
From: Guenter Roeck @ 2026-08-19 20:32 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Tero Kristo, Stephen Boyd, Brian Masney, Jerome Brunet,
Nobuhiro Iwamatsu, Nuno Sa, Michael Hennerich, Antoniu Miclaus,
Jonathan Cameron, David Lechner, Andy Shevchenko, Sunny Luo,
Xianwei Zhao, Mark Brown, Kees Cook, Kevin Hilman,
Mathieu Dubois-Briand, linux-omap, linux-arm-kernel, linux-hwmon,
linux, linux-iio, linux-amlogic, linux-spi, linux-clk,
linux-kernel
On Wed, Aug 19, 2026 at 09:05:17PM +0200, Geert Uytterhoeven wrote:
> 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.
>
> ltc428_clk_provider_setup() does not fill in any parent clocks, and
> assumes that init.num_parents 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: cbc29538dbf7d740 ("hwmon: Add driver for LTC4282")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Applied.
Thanks,
Guenter
> ---
> Compile-tested only.
> ---
> drivers/hwmon/ltc4282.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/ltc4282.c b/drivers/hwmon/ltc4282.c
> index b1675dc5b3c7fd2f..54ba4b8542e94b7b 100644
> --- a/drivers/hwmon/ltc4282.c
> +++ b/drivers/hwmon/ltc4282.c
> @@ -1106,7 +1106,7 @@ static const struct clk_ops ltc4282_ops = {
> static int ltc428_clk_provider_setup(struct ltc4282_state *st,
> struct device *dev)
> {
> - struct clk_init_data init;
> + struct clk_init_data init = {};
> int ret;
>
> if (!IS_ENABLED(CONFIG_COMMON_CLK))
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH treewide 1/5] clk: ti: Make sure clk_init_data is fully initialized
2026-08-19 19:05 ` [PATCH treewide 1/5] clk: ti: Make sure clk_init_data is fully initialized Geert Uytterhoeven
@ 2026-08-19 21:21 ` Brian Masney
0 siblings, 0 replies; 12+ messages in thread
From: Brian Masney @ 2026-08-19 21:21 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Tero Kristo, Stephen Boyd, Brian Masney, Jerome Brunet,
Nobuhiro Iwamatsu, Nuno Sa, Guenter Roeck, Michael Hennerich,
Antoniu Miclaus, Jonathan Cameron, David Lechner, Andy Shevchenko,
Sunny Luo, Xianwei Zhao, Mark Brown, Kees Cook, Kevin Hilman,
Mathieu Dubois-Briand, linux-omap, linux-arm-kernel, linux-hwmon,
linux, linux-iio, linux-amlogic, linux-spi, linux-clk,
linux-kernel
On Wed, Aug 19, 2026 at 09:05:15PM +0200, Geert Uytterhoeven wrote:
> 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 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: 667f420c09f1417c ("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>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH treewide 2/5] clk: visconti: Make sure clk_init_data is fully initialized
2026-08-19 19:05 ` [PATCH treewide 2/5] clk: visconti: " Geert Uytterhoeven
@ 2026-08-19 21:21 ` Brian Masney
0 siblings, 0 replies; 12+ messages in thread
From: Brian Masney @ 2026-08-19 21:21 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Tero Kristo, Stephen Boyd, Brian Masney, Jerome Brunet,
Nobuhiro Iwamatsu, Nuno Sa, Guenter Roeck, Michael Hennerich,
Antoniu Miclaus, Jonathan Cameron, David Lechner, Andy Shevchenko,
Sunny Luo, Xianwei Zhao, Mark Brown, Kees Cook, Kevin Hilman,
Mathieu Dubois-Briand, linux-omap, linux-arm-kernel, linux-hwmon,
linux, linux-iio, linux-amlogic, linux-spi, linux-clk,
linux-kernel
On Wed, Aug 19, 2026 at 09:05:16PM +0200, Geert Uytterhoeven wrote:
> 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: b4cbe606dc3674b2 ("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>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH treewide 3/5] hwmon: (ltc4282) Make sure clk_init_data is fully initialized
2026-08-19 19:05 ` [PATCH treewide 3/5] hwmon: (ltc4282) " Geert Uytterhoeven
2026-08-19 20:32 ` Guenter Roeck
@ 2026-08-19 21:22 ` Brian Masney
1 sibling, 0 replies; 12+ messages in thread
From: Brian Masney @ 2026-08-19 21:22 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Tero Kristo, Stephen Boyd, Brian Masney, Jerome Brunet,
Nobuhiro Iwamatsu, Nuno Sa, Guenter Roeck, Michael Hennerich,
Antoniu Miclaus, Jonathan Cameron, David Lechner, Andy Shevchenko,
Sunny Luo, Xianwei Zhao, Mark Brown, Kees Cook, Kevin Hilman,
Mathieu Dubois-Briand, linux-omap, linux-arm-kernel, linux-hwmon,
linux, linux-iio, linux-amlogic, linux-spi, linux-clk,
linux-kernel
On Wed, Aug 19, 2026 at 09:05:17PM +0200, Geert Uytterhoeven wrote:
> 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.
>
> ltc428_clk_provider_setup() does not fill in any parent clocks, and
> assumes that init.num_parents 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: cbc29538dbf7d740 ("hwmon: Add driver for LTC4282")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Brian Masney <bmasney@redhat.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH treewide 4/5] iio: frequency: adf4377: Make sure clk_init_data is fully initialized
2026-08-19 19:05 ` [PATCH treewide 4/5] iio: frequency: adf4377: " Geert Uytterhoeven
@ 2026-08-19 21:22 ` Brian Masney
0 siblings, 0 replies; 12+ messages in thread
From: Brian Masney @ 2026-08-19 21:22 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Tero Kristo, Stephen Boyd, Brian Masney, Jerome Brunet,
Nobuhiro Iwamatsu, Nuno Sa, Guenter Roeck, Michael Hennerich,
Antoniu Miclaus, Jonathan Cameron, David Lechner, Andy Shevchenko,
Sunny Luo, Xianwei Zhao, Mark Brown, Kees Cook, Kevin Hilman,
Mathieu Dubois-Briand, linux-omap, linux-arm-kernel, linux-hwmon,
linux, linux-iio, linux-amlogic, linux-spi, linux-clk,
linux-kernel
On Wed, Aug 19, 2026 at 09:05:18PM +0200, Geert Uytterhoeven wrote:
> 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.
>
> adf4377_clk_register() 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: 60e5448ddbec2dc2 ("iio: frequency: adf4377: add clk provider support")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Brian Masney <bmasney@redhat.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH treewide 5/5] spi: amlogic-spisg: Make sure clk_init_data is fully initialized
2026-08-19 19:05 ` [PATCH treewide 5/5] spi: amlogic-spisg: " Geert Uytterhoeven
@ 2026-08-19 21:23 ` Brian Masney
0 siblings, 0 replies; 12+ messages in thread
From: Brian Masney @ 2026-08-19 21:23 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Tero Kristo, Stephen Boyd, Brian Masney, Jerome Brunet,
Nobuhiro Iwamatsu, Nuno Sa, Guenter Roeck, Michael Hennerich,
Antoniu Miclaus, Jonathan Cameron, David Lechner, Andy Shevchenko,
Sunny Luo, Xianwei Zhao, Mark Brown, Kees Cook, Kevin Hilman,
Mathieu Dubois-Briand, linux-omap, linux-arm-kernel, linux-hwmon,
linux, linux-iio, linux-amlogic, linux-spi, linux-clk,
linux-kernel
On Wed, Aug 19, 2026 at 09:05:19PM +0200, Geert Uytterhoeven wrote:
> 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.
>
> aml_spisg_clk_init() 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: cef9991e04aed330 ("spi: Add Amlogic SPISG driver")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Brian Masney <bmasney@redhat.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-08-19 21:23 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-19 19:05 [PATCH treewide 0/5] clk: Make sure clk_init_data is fully initialized (part 1) Geert Uytterhoeven
2026-08-19 19:05 ` [PATCH treewide 1/5] clk: ti: Make sure clk_init_data is fully initialized Geert Uytterhoeven
2026-08-19 21:21 ` Brian Masney
2026-08-19 19:05 ` [PATCH treewide 2/5] clk: visconti: " Geert Uytterhoeven
2026-08-19 21:21 ` Brian Masney
2026-08-19 19:05 ` [PATCH treewide 3/5] hwmon: (ltc4282) " Geert Uytterhoeven
2026-08-19 20:32 ` Guenter Roeck
2026-08-19 21:22 ` Brian Masney
2026-08-19 19:05 ` [PATCH treewide 4/5] iio: frequency: adf4377: " Geert Uytterhoeven
2026-08-19 21:22 ` Brian Masney
2026-08-19 19:05 ` [PATCH treewide 5/5] spi: amlogic-spisg: " Geert Uytterhoeven
2026-08-19 21:23 ` Brian Masney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox