* [PATCH net-next 1/3] net: macb: Make sure clk_init_data is fully initialized
2026-08-21 10:07 [PATCH net-next 0/3] net: Make sure clk_init_data is fully initialized Geert Uytterhoeven
@ 2026-08-21 10:07 ` Geert Uytterhoeven
2026-08-24 16:03 ` Théo Lebrun
2026-08-21 10:07 ` [PATCH net-next 2/3] net: mdio: mux-meson-g12a: " Geert Uytterhoeven
` (3 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21 10:07 UTC (permalink / raw)
To: Théo Lebrun, Conor Dooley, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Heiner Kallweit,
Russell King, Neil Armstrong, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl
Cc: netdev, linux-arm-kernel, linux-amlogic, linux-clk,
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.
Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
drivers/net/ethernet/cadence/macb_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 1476bce77f34d2a5..319e43098f57ed7b 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -5376,7 +5376,7 @@ static int fu540_c000_clk_init(struct platform_device *pdev, struct clk **pclk,
struct clk **hclk, struct clk **tx_clk,
struct clk **rx_clk, struct clk **tsu_clk)
{
- struct clk_init_data init;
+ struct clk_init_data init = {};
int err = 0;
err = macb_clk_init_dflt(pdev, pclk, hclk, tx_clk, rx_clk, tsu_clk);
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH net-next 1/3] net: macb: Make sure clk_init_data is fully initialized
2026-08-21 10:07 ` [PATCH net-next 1/3] net: macb: " Geert Uytterhoeven
@ 2026-08-24 16:03 ` Théo Lebrun
0 siblings, 0 replies; 7+ messages in thread
From: Théo Lebrun @ 2026-08-24 16:03 UTC (permalink / raw)
To: Geert Uytterhoeven, Conor Dooley, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Heiner Kallweit,
Russell King, Neil Armstrong, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl
Cc: netdev, linux-arm-kernel, linux-amlogic, linux-clk
Hello Geert,
On Fri Aug 21, 2026 at 12:07 PM CEST, 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.
>
> Make sure all members are fully initialized, to avoid such bugs, and to
> prevent future breakage when converting drivers to a different method
> for specifying the parents.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Compile-tested only.
> ---
> drivers/net/ethernet/cadence/macb_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index 1476bce77f34d2a5..319e43098f57ed7b 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -5376,7 +5376,7 @@ static int fu540_c000_clk_init(struct platform_device *pdev, struct clk **pclk,
> struct clk **hclk, struct clk **tx_clk,
> struct clk **rx_clk, struct clk **tsu_clk)
> {
> - struct clk_init_data init;
> + struct clk_init_data init = {};
> int err = 0;
>
> err = macb_clk_init_dflt(pdev, pclk, hclk, tx_clk, rx_clk, tsu_clk);
Reviewed-by: Théo Lebrun <theo.lebrun@bootlin.com>
I cannot give you a Tested-by because this triggers only on
sifive,fu540-c000-gem compatible matching upstream devicetrees
sifive/hifive-{unleashed,unmatched}-a00.dts
Thanks,
--
Théo Lebrun, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net-next 2/3] net: mdio: mux-meson-g12a: Make sure clk_init_data is fully initialized
2026-08-21 10:07 [PATCH net-next 0/3] net: Make sure clk_init_data is fully initialized Geert Uytterhoeven
2026-08-21 10:07 ` [PATCH net-next 1/3] net: macb: " Geert Uytterhoeven
@ 2026-08-21 10:07 ` Geert Uytterhoeven
2026-08-21 10:07 ` [PATCH net-next 3/3] net: phy: air_en8811h: " Geert Uytterhoeven
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21 10:07 UTC (permalink / raw)
To: Théo Lebrun, Conor Dooley, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Heiner Kallweit,
Russell King, Neil Armstrong, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl
Cc: netdev, linux-arm-kernel, linux-amlogic, linux-clk,
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.
Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
drivers/net/mdio/mdio-mux-meson-g12a.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mdio/mdio-mux-meson-g12a.c b/drivers/net/mdio/mdio-mux-meson-g12a.c
index 08d6a6c93fb8bf02..e6c9ef3641afa27e 100644
--- a/drivers/net/mdio/mdio-mux-meson-g12a.c
+++ b/drivers/net/mdio/mdio-mux-meson-g12a.c
@@ -223,7 +223,7 @@ static int g12a_ephy_glue_clk_register(struct device *dev)
{
struct g12a_mdio_mux *priv = dev_get_drvdata(dev);
const char *parent_names[PLL_MUX_NUM_PARENT];
- struct clk_init_data init;
+ struct clk_init_data init = {};
struct g12a_ephy_pll *pll;
struct clk_mux *mux;
struct clk *clk;
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH net-next 3/3] net: phy: air_en8811h: Make sure clk_init_data is fully initialized
2026-08-21 10:07 [PATCH net-next 0/3] net: Make sure clk_init_data is fully initialized Geert Uytterhoeven
2026-08-21 10:07 ` [PATCH net-next 1/3] net: macb: " Geert Uytterhoeven
2026-08-21 10:07 ` [PATCH net-next 2/3] net: mdio: mux-meson-g12a: " Geert Uytterhoeven
@ 2026-08-21 10:07 ` Geert Uytterhoeven
2026-08-22 19:44 ` [PATCH net-next 0/3] net: " Jakub Kicinski
2026-08-24 15:23 ` Brian Masney
4 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21 10:07 UTC (permalink / raw)
To: Théo Lebrun, Conor Dooley, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Heiner Kallweit,
Russell King, Neil Armstrong, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl
Cc: netdev, linux-arm-kernel, linux-amlogic, linux-clk,
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.
Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
drivers/net/phy/air_en8811h.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/air_en8811h.c b/drivers/net/phy/air_en8811h.c
index edd49c193e476838..d1ab8744288bba0c 100644
--- a/drivers/net/phy/air_en8811h.c
+++ b/drivers/net/phy/air_en8811h.c
@@ -932,7 +932,7 @@ static const struct clk_ops an8811hb_clk_ops = {
static int an8811hb_clk_provider_setup(struct device *dev, struct clk_hw *hw)
{
- struct clk_init_data init;
+ struct clk_init_data init = {};
int ret;
if (!IS_ENABLED(CONFIG_COMMON_CLK))
@@ -1031,7 +1031,7 @@ static const struct clk_ops en8811h_clk_ops = {
static int en8811h_clk_provider_setup(struct device *dev, struct clk_hw *hw)
{
- 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] 7+ messages in thread* Re: [PATCH net-next 0/3] net: Make sure clk_init_data is fully initialized
2026-08-21 10:07 [PATCH net-next 0/3] net: Make sure clk_init_data is fully initialized Geert Uytterhoeven
` (2 preceding siblings ...)
2026-08-21 10:07 ` [PATCH net-next 3/3] net: phy: air_en8811h: " Geert Uytterhoeven
@ 2026-08-22 19:44 ` Jakub Kicinski
2026-08-24 15:23 ` Brian Masney
4 siblings, 0 replies; 7+ messages in thread
From: Jakub Kicinski @ 2026-08-22 19:44 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Théo Lebrun, Conor Dooley, Andrew Lunn, David S . Miller,
Eric Dumazet, Paolo Abeni, Heiner Kallweit, Russell King,
Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
netdev, linux-arm-kernel, linux-amlogic, linux-clk
On Fri, 21 Aug 2026 12:07:29 +0200 Geert Uytterhoeven wrote:
> drivers/net/ethernet/cadence/macb_main.c | 2 +-
> drivers/net/mdio/mdio-mux-meson-g12a.c | 2 +-
> drivers/net/phy/air_en8811h.c | 4 ++--
Hi Geert!
Unfortunately we don't queue -next patches during the merge window,
you'll have to repsot.
--
pw-bot: defer
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH net-next 0/3] net: Make sure clk_init_data is fully initialized
2026-08-21 10:07 [PATCH net-next 0/3] net: Make sure clk_init_data is fully initialized Geert Uytterhoeven
` (3 preceding siblings ...)
2026-08-22 19:44 ` [PATCH net-next 0/3] net: " Jakub Kicinski
@ 2026-08-24 15:23 ` Brian Masney
4 siblings, 0 replies; 7+ messages in thread
From: Brian Masney @ 2026-08-24 15:23 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Théo Lebrun, Conor Dooley, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Heiner Kallweit,
Russell King, Neil Armstrong, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl, netdev, linux-arm-kernel, linux-amlogic,
linux-clk
On Fri, Aug 21, 2026 at 12:07:29PM +0200, Geert Uytterhoeven wrote:
> Hi all,
>
> 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.
>
> Hence this series aims to make sure all members are fully initialized,
> to avoid such bugs, and to prevent future breakage when converting
> drivers to a different method for specifying the parents.
>
> Part One[1] fixed all cases that I identified to be real bugs, in
> response to a crash I saw on BeagleBone Black.
>
> This series is the networking subpart of Part Two, which fixes remaining
> cases that are currently harmless. These are still fragile, and may
> cause future breakage when converting drivers to a different method for
> specifying the parents.
>
> Thanks for your comments!
>
> [1] "[PATCH treewide 0/5] clk: Make sure clk_init_data is fully
> initialized (part 1)"
> https://lore.kernel.org/cover.1787165329.git.geert+renesas@glider.be
For the series:
Reviewed-by: Brian Masney <bmasney@redhat.com>
^ permalink raw reply [flat|nested] 7+ messages in thread