mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> Signed-off-by: David Howells <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
44c7afffa4
commit
ed1cde6836
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue