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>] [day] [month] [year] [list]
Message-Id: <20170130184833.19095-1-fabf@skynet.be>
Date:   Mon, 30 Jan 2017 19:48:33 +0100
From:   Fabian Frederick <fabf@...net.be>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     linux-kernel@...r.kernel.org,
        Martin Schwidefsky <schwidefsky@...ibm.com>,
        linux-s390@...r.kernel.org, Fabian Frederick <fabf@...net.be>
Subject: [PATCH 12/14] s390/topology: use atomic_dec_not_zero()

instead of atomic_add_unless(value, -1, 0)

Signed-off-by: Fabian Frederick <fabf@...net.be>
---
 arch/s390/kernel/topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index 7b2b19b..820ef64 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -300,7 +300,7 @@ static atomic_t topology_poll = ATOMIC_INIT(0);
 
 static void set_topology_timer(void)
 {
-	if (atomic_add_unless(&topology_poll, -1, 0))
+	if (atomic_dec_not_zero(&topology_poll))
 		mod_timer(&topology_timer, jiffies + HZ / 10);
 	else
 		mod_timer(&topology_timer, jiffies + HZ * 60);
-- 
2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ