[PATCH] clk: visconti: pll: initialize clk_init_data to zero
nobuhiro.iwamatsu.x90 at mail.toshiba
nobuhiro.iwamatsu.x90 at mail.toshiba
Wed Apr 1 21:22:31 PDT 2026
Hi,
> -----Original Message-----
> From: Benoît Monin <benoit.monin at bootlin.com>
> Sent: Wednesday, April 1, 2026 9:30 PM
> To: Michael Turquette <mturquette at baylibre.com>; Stephen Boyd <sboyd at kernel.org>; iwamatsu nobuhiro(岩松 信洋
> □DITC○CPT) <nobuhiro.iwamatsu.x90 at mail.toshiba>; Rosen Penev <rosenp at gmail.com>; Brian Masney
> <bmasney at redhat.com>
> Cc: linux-clk at vger.kernel.org; linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org
> Subject: Re: [PATCH] clk: visconti: pll: initialize clk_init_data to zero
>
> On Monday, 30 March 2026 at 16:32:37 CEST, Brian Masney wrote:
> > Sashiko reported the following:
> >
> > > The struct clk_init_data init is declared on the stack without being
> > > fully zero-initialized. While fields like name, flags, parent_names,
> > > num_parents, and ops are explicitly assigned, the parent_data and
> > > parent_hws fields are left containing stack garbage.
> >
> > clk_core_populate_parent_map() currently prefers the parent names over
> > the parent data and hws, so this isn't a problem at the moment. If
> > that ordering ever changed in the future, then this could lead to some
> > unexpected crashes. Let's just go ahead and make sure that the struct
> > clk_init_data is initialized to zero as a good practice.
> >
> > Fixes: b4cbe606dc367 ("clk: visconti: Add support common clock driver
> > and reset driver")
> > Link:
> > https://sashiko.dev/#/patchset/20260326042317.122536-1-rosenp%40gmail.
> > com
> > Signed-off-by: Brian Masney <bmasney at redhat.com>
>
> Reviewed-by: Benoît Monin <benoit.monin at bootlin.com>
>
Reviewed-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90 at mail.toshiba>
Best regards,
Nobuhiro
More information about the linux-arm-kernel
mailing list