aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-s390/futex.h
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2006-07-12 10:39:55 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-07-12 10:39:55 -0400
commit13492c50f69bdf60a42debc6bd3ec49cc1dc941e (patch)
treeaba4230d71ff565ba994a75c0beeb1073c89891b /include/asm-s390/futex.h
parent6ab4879a0d074c938fd17dba141dce042fc17bee (diff)
[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>
Diffstat (limited to 'include/asm-s390/futex.h')
-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 1802775568b9..ffedf14f89f6 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)
98 98
99 if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) 99 if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
100 return -EFAULT; 100 return -EFAULT;
101 asm volatile(" cs %1,%4,0(%5)\n" 101 asm volatile(" sacf 256\n"
102 " cs %1,%4,0(%5)\n"
102 "0: lr %0,%1\n" 103 "0: lr %0,%1\n"
103 "1:\n" 104 "1: sacf 0\n"
104#ifndef __s390x__ 105#ifndef __s390x__
105 ".section __ex_table,\"a\"\n" 106 ".section __ex_table,\"a\"\n"
106 " .align 4\n" 107 " .align 4\n"