Skip to content

Commit

Permalink
frv: double syscall restarts, syscall restart in sigreturn()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Al Viro authored and Linus Torvalds committed Sep 20, 2010
1 parent 44c7aff commit ed1cde6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/frv/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 */
Expand Down Expand Up @@ -551,6 +552,7 @@ static void do_signal(void)
__frame->pc -= 4;
break;
}
__frame->syscallno = -1;
}

/* if there's no signal to deliver, we just put the saved sigmask
Expand Down

0 comments on commit ed1cde6

Please sign in to comment.