[PATCH net v4 0/5][pull request] ice: fix stats array overflow via proper realloc
flat view
COLD20d
From: Tony Nguyen <anthony.l.nguyen@intel.com>
Date: 2026-09-21 18:21:12
Przemek Kitszel says: Fix OOB access to the stats arrays. The first three commits are simple refactors to make the rest smaller, the fourth one untangles the logic/lifetime of the stats array entries, then we have the final fix by Michal for VF OOB access to the stats array. Michal's fix was made prior to the rest, I have only slightly changed it to base it on top of the pre-work commits, that should resolve all the corner/error cases reported by AI. The series was made anew vs the [v2], but the goal and spirit is similar, but I have started from beginning instead of playing whack-a-mole with yet another corner cases. We are also back to [v0] by Michal, as it turned out to be more elegant finish with my first four patches already intact. [v0] https://lore.kernel.org/netdev/20260520183501.3360810-3-anthony.l.nguyen@intel.com (local) [v2] https://sashiko.dev/#/message/20260812204619.32253-3-przemyslaw.kitszel%40intel.com --- v4: Rebase and resend of: https://lore.kernel.org/intel-wired-lan/20260911113848.44086-1-przemyslaw.kitszel@intel.com/ (local) The following are changes since commit 1e24c4f2ee44be0eee94092b5d13cbdb4bdf0d60: selftests: tc-testing: add a lateral-drift hfsc classify-walk test and are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 100GbE Michal Schmidt (1): ice: fix stats array overflow when VF requests more queues Przemek Kitszel (4): ice: extract __ice_vsi_free_stats() ice: extract ice_vsi_new_stat_arrays() ice: extract ice_vsi_get_num_qs() ice: rebuild ring stats arrays instead of reallocating them in place drivers/net/ethernet/intel/ice/ice.h | 8 +- drivers/net/ethernet/intel/ice/ice_lib.c | 295 ++++++++++++-------- drivers/net/ethernet/intel/ice/ice_lib.h | 1 + drivers/net/ethernet/intel/ice/ice_vf_lib.c | 4 + 4 files changed, 183 insertions(+), 125 deletions(-) -- 2.47.1