Otherwise, a restarted system call that gets interrupted before
the restart has taken effect by _another_ signal will potentially
restart the wrong system call.
{
struct k_sigaction *ka = ¤t->sighand->action[sig-1];
+ /* Always make any pending restarted system calls return -EINTR */
+ current_thread_info()->restart_block.fn = do_no_restart_syscall;
+
/* Are we from a system call? */
if (regs->orig_eax >= 0) {
/* If so, check system call restarting.. */
switch (regs->eax) {
case -ERESTART_RESTARTBLOCK:
- current_thread_info()->restart_block.fn = do_no_restart_syscall;
case -ERESTARTNOHAND:
regs->eax = -EINTR;
break;