Commit 6ebed0fa authored by Paul Mackerras's avatar Paul Mackerras

[PATCH] PPC32: cancel syscall restart on signal delivery

This patch ensures that the PPC kernel cancels any pending restarted
system call when it delivers a signal.  This is the PPC counterpart of
the change that has recently gone into i386 and other architectures.
parent 0837a685
......@@ -569,10 +569,6 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs)
regs->result = -EINTR;
regs->gpr[3] = EINTR;
/* note that the cr0.SO bit is already set */
/* clear any restart function that was set */
if (ret == ERESTART_RESTARTBLOCK)
current_thread_info()->restart_block.fn
= do_no_restart_syscall;
} else {
regs->nip -= 4; /* Back up & retry system call */
regs->result = 0;
......@@ -587,6 +583,9 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs)
if (signr == 0)
return 0; /* no signals delivered */
/* Always make any pending restarted system calls return -EINTR */
current_thread_info()->restart_block.fn = do_no_restart_syscall;
if ((ka->sa.sa_flags & SA_ONSTACK) && current->sas_ss_size
&& !on_sig_stack(regs->gpr[1]))
newsp = current->sas_ss_sp + current->sas_ss_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment