mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 19:07:52 +00:00
i40iw: Fix potential fcn_id_array out of bounds
Avoid out of bounds error by utilizing I40IW_MAX_STATS_COUNT instead of I40IW_INVALID_FCN_ID. Signed-off-by: Christopher N Bednarz <christoper.n.bednarz@intel.com> Signed-off-by: Henry Orosco <henry.orosco@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
a28f047e5f
commit
aa939c12ab
1 changed files with 1 additions and 1 deletions
|
@ -4881,7 +4881,7 @@ void i40iw_vsi_stats_free(struct i40iw_sc_vsi *vsi)
|
||||||
{
|
{
|
||||||
u8 fcn_id = vsi->fcn_id;
|
u8 fcn_id = vsi->fcn_id;
|
||||||
|
|
||||||
if ((vsi->stats_fcn_id_alloc) && (fcn_id != I40IW_INVALID_FCN_ID))
|
if (vsi->stats_fcn_id_alloc && fcn_id < I40IW_MAX_STATS_COUNT)
|
||||||
vsi->dev->fcn_id_array[fcn_id] = false;
|
vsi->dev->fcn_id_array[fcn_id] = false;
|
||||||
i40iw_hw_stats_stop_timer(vsi);
|
i40iw_hw_stats_stop_timer(vsi);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue