mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04: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 <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
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;
|
||||
|
||||
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;
|
||||
i40iw_hw_stats_stop_timer(vsi);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue