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]
Date:	Tue, 12 Feb 2008 16:08:32 +1000
From:	Greg Ungerer <gerg@...pgear.com>
To:	torvalds@...ux-foundation.org
Cc:	gerg@...inux.org, linux-kernel@...r.kernel.org
Subject: [M68KNOMMU]: avoid unneccessary use of xchg() in set_mb()

Avoid unneccessary use of xchg() in set_mb().

Signed-off-by: Greg Ungerer <gerg@...inux.org>
---

diff -Naurp linux-2.6.25-rc1/include/asm-m68knommu/system.h linux-2.6.x/include/asm-m68knommu/system.h
--- linux-2.6.25-rc1/include/asm-m68knommu/system.h	2008-02-11 14:50:23.000000000 +1000
+++ linux-2.6.x/include/asm-m68knommu/system.h	2008-02-12 13:58:55.000000000 +1000
@@ -104,7 +104,7 @@ asmlinkage void resume(void);
 #define mb()   asm volatile (""   : : :"memory")
 #define rmb()  asm volatile (""   : : :"memory")
 #define wmb()  asm volatile (""   : : :"memory")
-#define set_mb(var, value) do { xchg(&var, value); } while (0)
+#define set_mb(var, value)	({ (var) = (value); wmb(); })
 
 #ifdef CONFIG_SMP
 #define smp_mb()	mb()
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists