{
unsigned int err = 0;
+ /* Always make any pending restarted system calls return -EINTR */
+ current_thread_info()->restart_block.fn = do_no_restart_syscall;
+
#if DEBUG_SIG
printk("SIG restore_sigcontext: sc=%p err(%x) eip(%x) cs(%x) flg(%x)\n",
sc, sc->err, sc->eip, sc->cs, sc->eflags);
{
unsigned int err = 0;
+ /* Always make any pending restarted system calls return -EINTR */
+ current_thread_info()->restart_block.fn = do_no_restart_syscall;
#define COPY(x) err |= __get_user(regs->x, &sc->x)
/* If so, check system call restarting.. */
switch (regs->rax) {
case -ERESTART_RESTARTBLOCK:
- current_thread_info()->restart_block.fn = do_no_restart_syscall;
- /* FALL THROUGH */
case -ERESTARTNOHAND:
regs->rax = -EINTR;
break;
regs->rax = regs->orig_rax;
regs->rip -= 2;
}
- if (regs->rax == (unsigned long)-ERESTART_RESTARTBLOCK){
- regs->rax = __NR_restart_syscall;
- regs->rip -= 2;
- }
}
#ifdef CONFIG_IA32_EMULATION
regs->rax = regs->orig_rax;
regs->rip -= 2;
}
+ if (regs->rax == (unsigned long)-ERESTART_RESTARTBLOCK) {
+ regs->rax = __NR_restart_syscall;
+ regs->rip -= 2;
+ }
}
return 0;
}