summaryrefslogtreecommitdiffstats
path: root/arch/frv/kernel
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2010-09-20 15:13:25 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2010-09-20 10:44:38 -0700
commited1cde68365c1251b920900c51e73675ff38dc66 (patch)
tree7f43fcfef76bc3d715db22ab575efadeefaf8739 /arch/frv/kernel
parent44c7afffa429a7cdcd1755019ab76566ff41e66d (diff)
downloadlinux-ed1cde68365c1251b920900c51e73675ff38dc66.tar.bz2
frv: double syscall restarts, syscall restart in sigreturn()
We need to make sure that only the first do_signal() to be handled on the way out syscall will bother with syscall restarts; additionally, the check on the "signal has user handler" path had been wrong - compare with restart prevention in sigreturn()... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/frv/kernel')
-rw-r--r--arch/frv/kernel/signal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/frv/kernel/signal.c b/arch/frv/kernel/signal.c
index bd13b57a5c9b..bab01298b58e 100644
--- a/arch/frv/kernel/signal.c
+++ b/arch/frv/kernel/signal.c
@@ -446,7 +446,7 @@ static int handle_signal(unsigned long sig, siginfo_t *info,
int ret;
/* Are we from a system call? */
- if (in_syscall(__frame)) {
+ if (__frame->syscallno != -1) {
/* If so, check system call restarting.. */
switch (__frame->gr8) {
case -ERESTART_RESTARTBLOCK:
@@ -465,6 +465,7 @@ static int handle_signal(unsigned long sig, siginfo_t *info,
__frame->gr8 = __frame->orig_gr8;
__frame->pc -= 4;
}
+ __frame->syscallno = -1;
}
/* Set up the stack frame */
@@ -551,6 +552,7 @@ no_signal:
__frame->pc -= 4;
break;
}
+ __frame->syscallno = -1;
}
/* if there's no signal to deliver, we just put the saved sigmask