Commit 5ada03a9 authored by Paul Mackerras's avatar Paul Mackerras Committed by Linus Torvalds

[PATCH] Fix ppc system restart properly

We're actually much better off resetting system call restart at signal
return.

This makes all other resets unnecessary.

Here's the ppc version of it.
parent d0c41b23
...@@ -418,6 +418,9 @@ int sys_rt_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8, ...@@ -418,6 +418,9 @@ int sys_rt_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8,
{ {
struct rt_sigframe __user *rt_sf; struct rt_sigframe __user *rt_sf;
/* Always make any pending restarted system calls return -EINTR */
current_thread_info()->restart_block.fn = do_no_restart_syscall;
rt_sf = (struct rt_sigframe __user *) rt_sf = (struct rt_sigframe __user *)
(regs->gpr[1] + __SIGNAL_FRAMESIZE + 16); (regs->gpr[1] + __SIGNAL_FRAMESIZE + 16);
if (verify_area(VERIFY_READ, rt_sf, sizeof(struct rt_sigframe))) if (verify_area(VERIFY_READ, rt_sf, sizeof(struct rt_sigframe)))
...@@ -513,6 +516,9 @@ int sys_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8, ...@@ -513,6 +516,9 @@ int sys_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8,
struct mcontext __user *sr; struct mcontext __user *sr;
sigset_t set; sigset_t set;
/* Always make any pending restarted system calls return -EINTR */
current_thread_info()->restart_block.fn = do_no_restart_syscall;
sc = (struct sigcontext __user *)(regs->gpr[1] + __SIGNAL_FRAMESIZE); sc = (struct sigcontext __user *)(regs->gpr[1] + __SIGNAL_FRAMESIZE);
if (copy_from_user(&sigctx, sc, sizeof(sigctx))) if (copy_from_user(&sigctx, sc, sizeof(sigctx)))
goto badframe; goto badframe;
...@@ -583,9 +589,6 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs) ...@@ -583,9 +589,6 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs)
if (signr == 0) if (signr == 0)
return 0; /* no signals delivered */ 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 if ((ka->sa.sa_flags & SA_ONSTACK) && current->sas_ss_size
&& !on_sig_stack(regs->gpr[1])) && !on_sig_stack(regs->gpr[1]))
newsp = current->sas_ss_sp + current->sas_ss_size; 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