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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 12 Dec 2020 17:20:17 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Lijun Pan <ljp@...ux.ibm.com>
Cc:     netdev@...r.kernel.org, Haiyang Zhang <haiyangz@...rosoft.com>
Subject: Re: [PATCH net-next 3/3] use __netdev_notify_peers in hyperv

On Wed,  9 Dec 2020 00:18:11 -0600 Lijun Pan wrote:
> Start to use the lockless version of netdev_notify_peers.
> 
> Cc: Haiyang Zhang <haiyangz@...rosoft.com>
> Signed-off-by: Lijun Pan <ljp@...ux.ibm.com>
> ---
>  drivers/net/hyperv/netvsc_drv.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
> index d17bbc75f5e7..4e3dac7bb944 100644
> --- a/drivers/net/hyperv/netvsc_drv.c
> +++ b/drivers/net/hyperv/netvsc_drv.c
> @@ -2130,10 +2130,10 @@ static void netvsc_link_change(struct work_struct *w)
>  		break;
>  	}
>  
> -	rtnl_unlock();
> -
>  	if (notify)
> -		netdev_notify_peers(net);
> +		__netdev_notify_peers(net);
> +
> +	rtnl_unlock();

Looks like this code is only using this "notify" variable because it
wanted to wait until unlock to call the function. I think you can now
just call the helper where notify used to be set to true.

Powered by blists - more mailing lists