]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ice: realloc VSI stats arrays
authorMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tue, 24 Oct 2023 11:09:26 +0000 (13:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:35:41 +0000 (16:35 +0200)
commitfeddf6c09c44339a75a54322573ae14ef226404b
tree8113e307cddd4def2ba02725bbe584ec54fcc512
parent493b29930f66b865d969badfb3d0431dae76a1ff
ice: realloc VSI stats arrays

[ Upstream commit 5995ef88e3a8c2b014f51256a88be8e336532ce7 ]

Previously only case when queues amount is lower was covered. Implement
realloc for case when queues amount is higher than previous one. Use
krealloc() function and zero new allocated elements.

It has to be done before ice_vsi_def_cfg(), because stats element for
ring is set there.

Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Stable-dep-of: 1cb7fdb1dfde ("ice: fix memory corruption bug with suspend and rebuild")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/ice/ice_lib.c