* [patch] s390: fix futex_atomic_cmpxchg_inatomic
@ 2006-07-10 9:28 Martin Schwidefsky
0 siblings, 0 replies; only message in thread
From: Martin Schwidefsky @ 2006-07-10 9:28 UTC (permalink / raw)
To: linux-kernel
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
[S390] fix futex_atomic_cmpxchg_inatomic
futex_atomic_cmpxchg_inatomic has the same bug as the other
atomic futex operations: the operation needs to be done in the
user address space, not the kernel address space. Add the missing
sacf 256 & sacf 0.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
include/asm-s390/futex.h | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff -urpN linux-2.6/include/asm-s390/futex.h linux-2.6-patched/include/asm-s390/futex.h
--- linux-2.6/include/asm-s390/futex.h 2006-06-18 03:49:35.000000000 +0200
+++ linux-2.6-patched/include/asm-s390/futex.h 2006-07-10 10:33:42.000000000 +0200
@@ -98,9 +98,10 @@ futex_atomic_cmpxchg_inatomic(int __user
if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
return -EFAULT;
- asm volatile(" cs %1,%4,0(%5)\n"
+ asm volatile(" sacf 256\n"
+ " cs %1,%4,0(%5)\n"
"0: lr %0,%1\n"
- "1:\n"
+ "1: sacf 0\n"
#ifndef __s390x__
".section __ex_table,\"a\"\n"
" .align 4\n"
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-07-10 9:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-10 9:28 [patch] s390: fix futex_atomic_cmpxchg_inatomic Martin Schwidefsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®