This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / arch / s390 / kernel / compat_signal.c
index 67134ee..70c83cb 100644 (file)
@@ -40,6 +40,7 @@ typedef struct
        __u8 callee_used_stack[__SIGNAL_FRAMESIZE32];
        struct sigcontext32 sc;
        _sigregs32 sregs;
+       int signo;
        __u8 retcode[S390_SYSCALL_SIZE];
 } sigframe32;
 
@@ -497,6 +498,10 @@ static void setup_frame32(int sig, struct k_sigaction *ka,
           To avoid breaking binary compatibility, they are passed as args. */
        regs->gprs[4] = current->thread.trap_no;
        regs->gprs[5] = current->thread.prot_addr;
+
+       /* Place signal number on stack to allow backtrace from handler.  */
+       if (__put_user(regs->gprs[2], (int __user *) &frame->signo))
+               goto give_sigsegv;
        return;
 
 give_sigsegv: