Commit 2deba1bd7126aadb5750beb927c878a6490065e6

Authored by Al Viro
Committed by Matt Turner
1 parent bdc8b8914b

alpha: belated ERESTART_RESTARTBLOCK race fix

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>

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

arch/alpha/kernel/signal.c
... ... @@ -239,6 +239,8 @@
239 239 unsigned long usp;
240 240 long i, err = __get_user(regs->pc, &sc->sc_pc);
241 241  
  242 + current_thread_info()->restart_block.fn = do_no_restart_syscall;
  243 +
242 244 sw->r26 = (unsigned long) ret_from_sys_call;
243 245  
244 246 err |= __get_user(regs->r0, sc->sc_regs+0);
... ... @@ -591,7 +593,6 @@
591 593 regs->pc -= 4;
592 594 break;
593 595 case ERESTART_RESTARTBLOCK:
594   - current_thread_info()->restart_block.fn = do_no_restart_syscall;
595 596 regs->r0 = EINTR;
596 597 break;
597 598 }