Skip to content

Commit

Permalink
[S390] fix syscall restart handling.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Sep 20, 2006
1 parent 39b083f commit 8427082
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/s390/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8427082

Please sign in to comment.