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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 02 Nov 2018 23:31:38 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     mk.singh@...cle.com
Cc:     netdev@...r.kernel.org, eric.dumazet@...il.com, mkubecek@...e.cz,
        j.vosburgh@...il.com, vfalico@...il.com, andy@...yhouse.net,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bonding:avoid repeated display of same link status
 change

From: mk.singh@...cle.com
Date: Wed, 31 Oct 2018 16:27:28 +0530

> -			if (slave->delay) {
> +			if (slave->delay &&
> +			    !atomic64_read(&bond->rtnl_needed)) {
 ...
> +			    !atomic64_read(&bond->rtnl_needed)) {
 ...
> +			atomic64_set(&bond->rtnl_needed, 1);
 ...
> +		atomic64_set(&bond->rtnl_needed, 0);
 ...
> @@ -229,6 +229,7 @@ struct bonding {
>  	struct	 dentry *debug_dir;
>  #endif /* CONFIG_DEBUG_FS */
>  	struct rtnl_link_stats64 bond_stats;
> +	atomic64_t rtnl_needed;

There is nothing "atomic" about a value that is only set and read.

And using a full 64-bit value for something taking on only '0' and
'1' is unnecessary as well.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ