Hi Dave,
This patchset from Eran contains a fix to ethtool set_channels, where the call
to get_channels with an uninitialized parameter might result in garbage fields.
It also contains two followup changes in our mlx4/mlx5 Eth drivers.
Series generated against net commit:
0faa9cb5b383 net sched actions: fix refcnt when GETing of action after bind
Thanks,
Tariq.
Eran Ben Elisha (3):
net: ethtool: Initialize buffer when querying device channel settings
net/mlx4_en: Remove unnecessary checks when setting num channels
net/mlx5e: Remove unnecessary checks when setting num channels
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 7 +------
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 10 ----------
net/core/ethtool.c | 2 +-
3 files changed, 2 insertions(+), 17 deletions(-)
--
1.8.3.1
From: Eran Ben Elisha <redacted>
Ethtool channels respond struct was uninitialized when querying device
channel boundaries settings. As a result, unreported fields by the driver
hold garbage. This may cause sending unsupported params to driver.
Fixes: 8bf368620486 ('ethtool: ensure channel counts are within bounds ...')
Signed-off-by: Eran Ben Elisha <redacted>
Signed-off-by: Tariq Toukan <redacted>
CC: John W. Linville <redacted>
---
net/core/ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Eran Ben Elisha <redacted>
Boundaries checks for the number of RX, TX, other and combined channels
should be checked by the caller and not in the driver.
In addition, remove wrong memset on get channels as it overrides the cmd
field in the requester struct.
Signed-off-by: Eran Ben Elisha <redacted>
Signed-off-by: Tariq Toukan <redacted>
---
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
From: Eran Ben Elisha <redacted>
Boundaries checks for the number of RX and TX should be checked by the
caller and not in the driver.
Signed-off-by: Eran Ben Elisha <redacted>
Signed-off-by: Tariq Toukan <redacted>
---
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 10 ----------
1 file changed, 10 deletions(-)
@@ -554,16 +554,6 @@ static int mlx5e_set_channels(struct net_device *dev,__func__);return-EINVAL;}-if(ch->rx_count||ch->tx_count){-netdev_info(dev,"%s: separate rx/tx count not supported\n",-__func__);-return-EINVAL;-}-if(count>ncv){-netdev_info(dev,"%s: count (%d) > max (%d)\n",-__func__,count,ncv);-return-EINVAL;-}if(priv->params.num_channels==count)return0;
This patchset from Eran contains a fix to ethtool set_channels, where the call
to get_channels with an uninitialized parameter might result in garbage fields.
It also contains two followup changes in our mlx4/mlx5 Eth drivers.
Series generated against net commit:
0faa9cb5b383 net sched actions: fix refcnt when GETing of action after bind