Re: [PATCH] clk: mstar: msc313-mpll: fix one-element shadow array overrun
From: Daniel Palmer
Date: Mon May 11 2026 - 05:21:47 EST
Hi Stepan,
On Sun, 10 May 2026 at 02:58, Stepan Ionichev <sozdayvek@xxxxxxxxx> wrote:
> mpll->clk_data = devm_kzalloc(dev, struct_size(mpll->clk_data, hws,
> - ARRAY_SIZE(output_dividers)), GFP_KERNEL);
> + NUMOUTPUTS), GFP_KERNEL);
> if (!mpll->clk_data)
> return -ENOMEM;
It's been a long time since I wrote that stuff but what you have found
looks correct. I think initially the driver only exposed the "output
dividers" outputs and then was adjusted to expose the undivided pll
output and that allocation didn't get updated.
Since the report and the change look correct:
Acked-by: Daniel Palmer <daniel@xxxxxxxxx>
Cheers,
Daniel