]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
[S390] user space fault: report fault before calling do_exit
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 17 May 2010 08:00:13 +0000 (10:00 +0200)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Mon, 17 May 2010 08:00:16 +0000 (10:00 +0200)
Report user space faults before calling do_exit, since do_exit does
not return and therefore we will never see the fault message on the
console.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/traps.c

index 6e7ad63854c06162af8fba1496165dfaba74d4bf..e605f070610c21f451e1fe3aa4e55be41dfb6758 100644 (file)
@@ -390,8 +390,8 @@ static void default_trap_handler(struct pt_regs * regs, long interruption_code)
 {
         if (regs->psw.mask & PSW_MASK_PSTATE) {
                local_irq_enable();
-               do_exit(SIGSEGV);
                report_user_fault(interruption_code, regs);
+               do_exit(SIGSEGV);
        } else
                die("Unknown program exception", regs, interruption_code);
 }