Skip to content

Commit c475e11

Browse files
Tariq ToukanSaeed Mahameed
authored andcommitted
net/mlx5e: Fix access to non-existing receive queue
In case number of channels is changed while interface is down, RSS indirection table is mistakenly not modified accordingly, causing access to out-of-range non-existing object. Fix by updating the RSS indireciton table also in the early return flow of interface down. Fixes: fb35c53 ("net/mlx5e: Fix NULL pointer derefernce in set channels error flow") Fixes: bbeb53b ("net/mlx5e: Move RSS params to a dedicated struct") Reported-by: Or Gerlitz <ogerlitz@mellanox.com> Tested-by: Maria Pasechnik <mariap@mellanox.com> Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
1 parent 3d6f3cd commit c475e11

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,9 @@ int mlx5e_ethtool_set_channels(struct mlx5e_priv *priv,
424424

425425
if (!test_bit(MLX5E_STATE_OPENED, &priv->state)) {
426426
priv->channels.params = new_channels.params;
427+
if (!netif_is_rxfh_configured(priv->netdev))
428+
mlx5e_build_default_indir_rqt(priv->rss_params.indirection_rqt,
429+
MLX5E_INDIR_RQT_SIZE, count);
427430
goto out;
428431
}
429432

0 commit comments

Comments
 (0)