aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2006-07-12 16:39:55 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2006-08-06 20:52:16 -0700
commit3b6eaf273f4a41cbba86e0cb164e5d69c84c25a3 (patch)
treea39b7d48b2e1b47ec3e88c0e6186ac9e2bdb4e4d
parent93257abd22720f4508e134e31c3f172c6c898d68 (diff)
S390: fix futex_atomic_cmpxchg_inatomic
[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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--include/asm-s390/futex.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/asm-s390/futex.h b/include/asm-s390/futex.h
index 1802775568b..ffedf14f89f 100644
--- a/include/asm-s390/futex.h
+++ b/include/asm-s390/futex.h
@@ -98,9 +98,10 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
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"