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]
Date:   Wed, 25 Aug 2021 12:01:22 +0300
From:   Leon Romanovsky <leonro@...dia.com>
To:     Jakub Kicinski <kuba@...nel.org>,
        Saeed Mahameed <saeedm@...dia.com>,
        "David S . Miller" <davem@...emloft.net>
CC:     Dmytro Linkin <dlinkin@...dia.com>, <netdev@...r.kernel.org>,
        Roi Dayan <roid@...dia.com>,
        Yicong Yang <yangyicong@...ilicon.com>
Subject: Re: [PATCH net] net/mlx5: Remove all auxiliary devices at the
 unregister event

On Sat, Aug 21, 2021 at 03:05:11PM +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@...dia.com>
> 
> The call to mlx5_unregister_device() means that mlx5_core driver is
> removed. In such scenario, we need to disregard all other flags like
> attach/detach and forcibly remove all auxiliary devices.
> 
> Fixes: a5ae8fc9058e ("net/mlx5e: Don't create devices during unload flow")
> Tested-and-Reported-by: Yicong Yang <yangyicong@...ilicon.com>
> Signed-off-by: Leon Romanovsky <leonro@...dia.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/dev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Any reason do not apply this patch?

> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/dev.c b/drivers/net/ethernet/mellanox/mlx5/core/dev.c
> index ff6b03dc7e32..e8093c4e09d4 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/dev.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/dev.c
> @@ -450,7 +450,7 @@ int mlx5_register_device(struct mlx5_core_dev *dev)
>  void mlx5_unregister_device(struct mlx5_core_dev *dev)
>  {
>  	mutex_lock(&mlx5_intf_mutex);
> -	dev->priv.flags |= MLX5_PRIV_FLAGS_DISABLE_ALL_ADEV;
> +	dev->priv.flags = MLX5_PRIV_FLAGS_DISABLE_ALL_ADEV;
>  	mlx5_rescan_drivers_locked(dev);
>  	mutex_unlock(&mlx5_intf_mutex);
>  }
> -- 
> 2.31.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ