lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d3d5d0cb-83a7-4b53-a07f-7b00db3ebada@intel.com>
Date: Tue, 30 Jul 2024 11:50:43 +0200
From: Wojciech Drewek <wojciech.drewek@...el.com>
To: Tariq Toukan <tariqt@...dia.com>, "David S. Miller" <davem@...emloft.net>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, "Eric
 Dumazet" <edumazet@...gle.com>
CC: <netdev@...r.kernel.org>, Saeed Mahameed <saeedm@...dia.com>, Gal Pressman
	<gal@...dia.com>, Leon Romanovsky <leonro@...dia.com>, Shahar Shitrit
	<shshitrit@...dia.com>, Carolina Jubran <cjubran@...dia.com>
Subject: Re: [PATCH net 8/8] net/mlx5e: Add a check for the return value from
 mlx5_port_set_eth_ptys



On 30.07.2024 08:16, Tariq Toukan wrote:
> From: Shahar Shitrit <shshitrit@...dia.com>
> 
> Since the documentation for mlx5_toggle_port_link states that it should
> only be used after setting the port register, we add a check for the
> return value from mlx5_port_set_eth_ptys to ensure the register was
> successfully set before calling it.
> 
> Fixes: 667daedaecd1 ("net/mlx5e: Toggle link only after modifying port parameters")
> Signed-off-by: Shahar Shitrit <shshitrit@...dia.com>
> Reviewed-by: Carolina Jubran <cjubran@...dia.com>
> Signed-off-by: Tariq Toukan <tariqt@...dia.com>
> ---

Reviewed-by: Wojciech Drewek <wojciech.drewek@...el.com>

>  drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> index 00d5661dc62e..36845872ae94 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> @@ -1409,7 +1409,12 @@ static int mlx5e_ethtool_set_link_ksettings(struct mlx5e_priv *priv,
>  	if (!an_changes && link_modes == eproto.admin)
>  		goto out;
>  
> -	mlx5_port_set_eth_ptys(mdev, an_disable, link_modes, ext);
> +	err = mlx5_port_set_eth_ptys(mdev, an_disable, link_modes, ext);
> +	if (err) {
> +		netdev_err(priv->netdev, "%s: failed to set ptys reg: %d\n", __func__, err);
> +		goto out;
> +	}
> +
>  	mlx5_toggle_port_link(mdev);
>  
>  out:

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ