]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[S390] fix syscall restart handling.
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 20 Sep 2006 13:58:54 +0000 (15:58 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 20 Sep 2006 13:58:54 +0000 (15:58 +0200)
If do_signal() gets called several times before returning to user space
and no signal is pending (e.g. cancelled by a debugger) syscall restart
handling could be done several times. This would change the user space
PSW to an address prior to the syscall instruction.
Fix this by making sure that syscall restart handling is only done once.

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

index a887b686f27927bb6119d5cff813388e3c74ac62..dd05423f87a8425fb51ac446fbaa0f4acc9416f5 100644 (file)
@@ -457,6 +457,7 @@ void do_signal(struct pt_regs *regs)
                case -ERESTART_RESTARTBLOCK:
                        regs->gprs[2] = -EINTR;
                }
+               regs->trap = -1;        /* Don't deal with this again. */
        }
 
        /* Get signal to deliver.  When running under ptrace, at this point