Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d5b02b3ff1d9a2e1074f559c84ed378cfa6fc3c0
Commit:     d5b02b3ff1d9a2e1074f559c84ed378cfa6fc3c0
Parent:     39f73b2886be3a255d8f4cd669c8c7e7957afbd9
Author:     Heiko Carstens <[EMAIL PROTECTED]>
AuthorDate: Tue Feb 19 15:29:34 2008 +0100
Committer:  Martin Schwidefsky <[EMAIL PROTECTED]>
CommitDate: Tue Feb 19 15:29:35 2008 +0100

    [S390] Fix futex_atomic_cmpxchg_std inline assembly.
    
    Add missing exception table entry so that the kernel can handle
    proctection exceptions as well on the cs instruction. Currently only
    specification exceptions are handled correctly.
    The missing entry allows user space to crash the kernel.
    
    Cc: stable <[EMAIL PROTECTED]>
    Signed-off-by: Heiko Carstens <[EMAIL PROTECTED]>
    Signed-off-by: Martin Schwidefsky <[EMAIL PROTECTED]>
---
 arch/s390/lib/uaccess_std.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/s390/lib/uaccess_std.c b/arch/s390/lib/uaccess_std.c
index 28c4500..d2ffbad 100644
--- a/arch/s390/lib/uaccess_std.c
+++ b/arch/s390/lib/uaccess_std.c
@@ -293,10 +293,10 @@ int futex_atomic_cmpxchg_std(int __user *uaddr, int 
oldval, int newval)
 
        asm volatile(
                "   sacf 256\n"
-               "   cs   %1,%4,0(%5)\n"
-               "0: lr   %0,%1\n"
-               "1: sacf 0\n"
-               EX_TABLE(0b,1b)
+               "0: cs   %1,%4,0(%5)\n"
+               "1: lr   %0,%1\n"
+               "2: sacf 0\n"
+               EX_TABLE(0b,2b) EX_TABLE(1b,2b)
                : "=d" (ret), "+d" (oldval), "=m" (*uaddr)
                : "0" (-EFAULT), "d" (newval), "a" (uaddr), "m" (*uaddr)
                : "cc", "memory" );
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to