Re: [PATCH iwl-net v2 2/2] ice: fix stats array overflow via proper realloc
From: Simon Horman <horms@kernel.org>
Date: 2026-07-13 14:04:27
Also in:
intel-wired-lan
On Tue, Jul 07, 2026 at 12:43:31AM +0200, Przemek Kitszel wrote:
Integrate ice_vsi_alloc_stat_arrays() with realloc variant. Instead of keeping two functions for stat arrays allocation, change the ice_vsi_realloc_stat_arrays() to handle initial condition (no vsi_stat entry) and replace ice_vsi_alloc_stat_arrays() by the more generic ice_vsi_realloc_stat_arrays(). Note that VSIs of ICE_VSI_CHNL type are ignored in realloc variant as they were in the replaced ice_vsi_alloc_stat_arrays(). This is a fix for stats array overflow that occurs when VF is given more queues (an operation that will be more frequent, and by bigger increase, when we will merge my "XLVF" series). Splat for increasing number of queues thanks to Michal Schmidt: KASAN detects the bug:
...
Fixes: 2a2cb4c6c181 ("ice: replace ice_vf_recreate_vsi() with ice_vf_reconfig_vsi()")
Closes: https://redhat.atlassian.net/browse/RHEL-164321
Reviewed-by: Marcin Szycik <redacted>
Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
---
This is an alternative to the fix [1] by Michal Schmidt, which were
blocked due to AI feedback. My fix was already developed before Michal's,
just not public back then. We have agreed to go on with my version.
[1] https://lore.kernel.org/netdev/20260520183501.3360810-3-anthony.l.nguyen@intel.com (local)Reviewed-by: Simon Horman <horms@kernel.org> ...