sparc: Prevent no-handler signal syscall restart recursion.
Explicitly clear the "in-syscall" bit when we have no signal handler and back up the program counters to back up the system call. Reported-by: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -580,12 +580,14 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0)
|
||||
regs->u_regs[UREG_I0] = orig_i0;
|
||||
regs->pc -= 4;
|
||||
regs->npc -= 4;
|
||||
pt_regs_clear_syscall(regs);
|
||||
}
|
||||
if (restart_syscall &&
|
||||
regs->u_regs[UREG_I0] == ERESTART_RESTARTBLOCK) {
|
||||
regs->u_regs[UREG_G1] = __NR_restart_syscall;
|
||||
regs->pc -= 4;
|
||||
regs->npc -= 4;
|
||||
pt_regs_clear_syscall(regs);
|
||||
}
|
||||
|
||||
/* if there's no signal to deliver, we just put the saved sigmask
|
||||
|
Reference in New Issue
Block a user