From: Heiko Carstens Date: Wed, 20 Sep 2006 13:58:54 +0000 (+0200) Subject: [S390] fix syscall restart handling. X-Git-Tag: v2.6.19-rc1~1298^2~29 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8427082a506f7ae0abf82ce0047a045ec4309e59;p=linux-2.6 [S390] fix syscall restart handling. 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 Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index a887b686f2..dd05423f87 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c @@ -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