Commit 13492c50 authored by Martin Schwidefsky's avatar Martin Schwidefsky

[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: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 6ab4879a
...@@ -98,9 +98,10 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) ...@@ -98,9 +98,10 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
return -EFAULT; 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" "0: lr %0,%1\n"
"1:\n" "1: sacf 0\n"
#ifndef __s390x__ #ifndef __s390x__
".section __ex_table,\"a\"\n" ".section __ex_table,\"a\"\n"
" .align 4\n" " .align 4\n"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment