From: Martin Schwidefsky Date: Wed, 12 Jul 2006 14:39:55 +0000 (+0200) Subject: [S390] fix futex_atomic_cmpxchg_inatomic X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=13492c50f69bdf60a42debc6bd3ec49cc1dc941e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [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 --- 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) 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"