allocation of memory.
Adjust over allocation of memory by correcting types in devm_kcalloc()
sizeof() arguments.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Reviewed-by: Przemek Kitszel
Signed-off-by: Aleksandr Mishin
---
v4:
- Remove Suggested-by: Przemek Kitsze
:49 schrieb Paul Menzel:
Am 08.07.24 um 20:27 schrieb Aleksandr Mishin:
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 incorrect types are used as sizeof()
ar
allocation of memory.
Adjust over allocation of memory by correcting types in devm_kcalloc()
sizeof() arguments.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Suggested-by: Przemek Kitszel
Signed-off-by: Aleksandr Mishin
---
v3:
- Update comment and use the correct e
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
ux Verification Center (linuxtesting.org) with SVACE.
Fixes: dc49c7723676 ("ice: Get MAC/PHY/link info and scheduler topology")
Signed-off-by: Aleksandr Mishin
---
drivers/net/ethernet/intel/ice/ice_sched.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/driver