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:   Mon, 29 Jul 2019 18:25:26 +0000
From:   Saeed Mahameed <saeedm@...lanox.com>
To:     "wenxu@...oud.cn" <wenxu@...oud.cn>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "davem@...emloft.net" <davem@...emloft.net>
Subject: Re: [PATCH net] net/mlx5e: Fix unnecessary flow_block_cb_is_busy call

On Sat, 2019-07-27 at 22:59 +0800, wenxu@...oud.cn wrote:
> From: wenxu <wenxu@...oud.cn>
> 
> When call flow_block_cb_is_busy. The indr_priv is guaranteed to
> NULL ptr. So there is no need to call flow_bock_cb_is_busy.
> 
> Fixes: 0d4fd02e7199 ("net: flow_offload: add flow_block_cb_is_busy()
> and use it")
> Signed-off-by: wenxu <wenxu@...oud.cn>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> index 7f747cb..496d303 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> @@ -722,10 +722,6 @@ static void mlx5e_rep_indr_tc_block_unbind(void
> *cb_priv)
>  		if (indr_priv)
>  			return -EEXIST;
>  
> -		if
> (flow_block_cb_is_busy(mlx5e_rep_indr_setup_block_cb,
> -					  indr_priv,
> &mlx5e_block_cb_list))
> -			return -EBUSY;
> -
>  		indr_priv = kmalloc(sizeof(*indr_priv), GFP_KERNEL);
>  		if (!indr_priv)
>  			return -ENOMEM;

Indeed flow_block_cb_is_busy is redundant and will always return false
in this path.

This is net-next material.

Dave let me know if you want me to take it to my branch.

Acked-by: Saeed Mahameed <saeedm@...lanox.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ