Subject: Re: [PATCH net-next v2] ice: Adjust over allocation of memory in ice_sched_add_root_node() and ice_sched_add_node()

From: Simon Horman <[email-masked]>
Date: Mon, 8 Jul 2024 08:29:51 +0100

On Sat, Jul 06, 2024 at 05:05:18PM +0300, Aleksandr Mishin wrote:
> In ice_sched_add_root_node() and ice_sched_add_node() there are calls to
> devm_kcalloc() in order to allocate memory for array of pointers to
> 'ice_sched_node' structure. But in this calls there are 'sizeof(*root)'
> instead of 'sizeof(root)' and 'sizeof(*node)' instead of 'sizeof(node)'.
> So memory is allocated for structures instead pointers. This lead to
> significant over allocation of memory.
> 
> Adjust over allocation of memory by correcting devm_kcalloc() parameters.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Suggested-by: Simon Horman <[email-masked]>

FTR, I did provide some review of v1.
But I don't think that counts as suggesting this patch.

> Signed-off-by: Aleksandr Mishin <[email-masked]>
> ---
> v2:
>   - Update comment, remove 'Fixes' tag and change the tree from 'net' to
>     'net-next' as suggested by Simon
> 	(https://lore.kernel.org/all/[email-masked]/)
> v1: https://lore.kernel.org/all/[email-masked]/

Also, v2 was sent less than 24h after v1,
please don't do that when posting patches to netdev.

Please do read
https://docs.kernel.org/process/maintainer-netdev.html

...