Skip to content

Commit

Permalink
alpha: belated ERESTART_RESTARTBLOCK race fix
Browse files Browse the repository at this point in the history
same thing as had been done on other targets back in 2003 -
move setting ->restart_block.fn into {rt_,}sigreturn().

Tested-by: Michael Cree <mcree@orcon.net.nz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Matt Turner <mattst88@gmail.com>
  • Loading branch information
Al Viro authored and Matt Turner committed Sep 19, 2010
1 parent bdc8b89 commit 2deba1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/alpha/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ restore_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
unsigned long usp;
long i, err = __get_user(regs->pc, &sc->sc_pc);

current_thread_info()->restart_block.fn = do_no_restart_syscall;

sw->r26 = (unsigned long) ret_from_sys_call;

err |= __get_user(regs->r0, sc->sc_regs+0);
Expand Down Expand Up @@ -591,7 +593,6 @@ syscall_restart(unsigned long r0, unsigned long r19,
regs->pc -= 4;
break;
case ERESTART_RESTARTBLOCK:
current_thread_info()->restart_block.fn = do_no_restart_syscall;
regs->r0 = EINTR;
break;
}
Expand Down

0 comments on commit 2deba1b

Please sign in to comment.