[lvc-project] [PATCH] clk: tegra: do not overallocate memory for bpmp clocks
Stephen Boyd
sboyd at kernel.org
Sun Sep 21 23:09:47 MSK 2025
Quoting Fedor Pchelkin (2025-04-26 05:54:28)
> struct tegra_bpmp::clocks is a pointer to a dynamically allocated array
> of pointers to 'struct tegra_bpmp_clk'.
>
> But the size of the allocated area is calculated like it is an array
> containing actual 'struct tegra_bpmp_clk' objects - it's not true, there
> are just pointers.
>
> Found by Linux Verification Center (linuxtesting.org) with Svace static
> analysis tool.
>
> Fixes: 2db12b15c6f3 ("clk: tegra: Register clocks from root to leaf")
> Signed-off-by: Fedor Pchelkin <pchelkin at ispras.ru>
> ---
Applied to clk-next
More information about the lvc-project
mailing list