[<prev] [next>] [day] [month] [year] [list]
Message-Id: <4CE656F402000078000234A0@vpn.id2.novell.com>
Date: Fri, 19 Nov 2010 09:52:36 +0000
From: "Jan Beulich" <JBeulich@...ell.com>
To: <mingo@...e.hu>, <tglx@...utronix.de>, <hpa@...or.com>
Cc: <stable@...nel.org>, <cebbert@...hat.com>,
"Jeff Mahoney" <jeffm@...e.com>, <linux-kernel@...r.kernel.org>,
<viro@...iv.linux.org.uk>
Subject: [PATCH] x86: restore 9d55b9923a1b7ea8193b8875c57ec940dc2ff027
(x86: replace LOCK_PREFIX in futex.h)
Somehow this change got lost during the move from include/asm-x86 to
arch/x86/include/asm (i.e. between .27 and .28, while the original fix
was applied for .25). The original commit comment was
"The exception fixup for the futex macros __futex_atomic_op1/2 and
futex_atomic_cmpxchg_inatomic() is missing an entry when the lock
prefix is replaced by a NOP via SMP alternatives.
Chuck Ebert tracked this down from the information provided in:
https://bugzilla.redhat.com/show_bug.cgi?id=429412
A possible solution would be to add another fixup after the
LOCK_PREFIX, so both the LOCK and NOP case have their own entry in
the exception table, but it's not really worth the trouble.
Simply replace LOCK_PREFIX with lock and keep those untouched by SMP
alternatives."
Signed-off-by: Jan Beulich <jbeulich@...ell.com>
Cc: stable@...nel.org
Cc: Al Viro <viro@...iv.linux.org.uk>
Cc: Chuck Ebbert <cebbert@...hat.com>
Cc: Jeff Mahoney <jeffm@...e.com>
---
arch/x86/include/asm/futex.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- linux-2.6.37-rc2/arch/x86/include/asm/futex.h
+++ linux-2.6.37-rc2/arch/x86/include/asm/futex.h
@@ -25,7 +25,7 @@
asm volatile("1:\tmovl %2, %0\n" \
"\tmovl\t%0, %3\n" \
"\t" insn "\n" \
- "2:\t" LOCK_PREFIX "cmpxchgl %3, %2\n" \
+ "2:\tlock; cmpxchgl %3, %2\n" \
"\tjnz\t1b\n" \
"3:\t.section .fixup,\"ax\"\n" \
"4:\tmov\t%5, %1\n" \
@@ -64,7 +64,7 @@ static inline int futex_atomic_op_inuser
__futex_atomic_op1("xchgl %0, %2", ret, oldval, uaddr, oparg);
break;
case FUTEX_OP_ADD:
- __futex_atomic_op1(LOCK_PREFIX "xaddl %0, %2", ret, oldval,
+ __futex_atomic_op1("lock; xaddl %0, %2", ret, oldval,
uaddr, oparg);
break;
case FUTEX_OP_OR:
@@ -122,7 +122,7 @@ static inline int futex_atomic_cmpxchg_i
if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
return -EFAULT;
- asm volatile("1:\t" LOCK_PREFIX "cmpxchgl %3, %1\n"
+ asm volatile("1:\tlock; cmpxchgl %3, %1\n"
"2:\t.section .fixup, \"ax\"\n"
"3:\tmov %2, %0\n"
"\tjmp 2b\n"
--
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