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: <20061201141130.GA24203@linux-mips.org>
Date:	Fri, 1 Dec 2006 14:11:30 +0000
From:	Ralf Baechle <ralf@...ux-mips.org>
To:	linux-kernel@...r.kernel.org
Subject: RFC: Unneeded memory barriers

When disassembling a kernel I found around over 90 sync Instructions from
mb, rmb and wmb calls in the kernel and only few of those make any sense
to me.  So here's the first one - I think the wmb() in kernel/futex.c is
not needed on uniprocessors so should become an smb_wmb().

  Ralf

Signed-off-by: Ralf Baechle <ralf@...ux-mips.org>

diff --git a/kernel/futex.c b/kernel/futex.c
index 93ef30b..d867899 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -553,7 +553,7 @@ static void wake_futex(struct futex_q *q
 	 * at the end of wake_up_all() does not prevent this store from
 	 * moving.
 	 */
-	wmb();
+	smp_wmb();
 	q->lock_ptr = NULL;
 }
 
-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ