Correct auto-restart of syscalls via restartblock
authorJesper Nilsson <jespern@axis.com>
Mon, 21 Mar 2011 15:07:05 +0000 (16:07 +0100)
committerJesper Nilsson <jespern@axis.com>
Mon, 21 Mar 2011 15:07:05 +0000 (16:07 +0100)
This would for example be poll(2)

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
arch/cris/arch-v10/kernel/signal.c

index b6be705c2a3e6fb7ec2994600e47deaebfcadbfa..e78fe49a98490723c16d7d3e9684e536dae4ec2a 100644 (file)
@@ -537,7 +537,7 @@ void do_signal(int canrestart, struct pt_regs *regs)
                        RESTART_CRIS_SYS(regs);
                }
                if (regs->r10 == -ERESTART_RESTARTBLOCK) {
                        RESTART_CRIS_SYS(regs);
                }
                if (regs->r10 == -ERESTART_RESTARTBLOCK) {
-                       regs->r10 = __NR_restart_syscall;
+                       regs->r9 = __NR_restart_syscall;
                        regs->irp -= 2;
                }
        }
                        regs->irp -= 2;
                }
        }