[PATCH] x86_64: Fix 32bit system call restart
[linux-2.6.git] / arch / x86_64 / kernel / signal.c
index d439ced150c603c33cbc2220bec5532654822b86..3fdcdba0fec5f8ebf758170f4a62b1d3f41135e8 100644 (file)
@@ -452,7 +452,9 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
                        regs->rip -= 2;
                }
                if (regs->rax == (unsigned long)-ERESTART_RESTARTBLOCK) {
-                       regs->rax = __NR_restart_syscall;
+                       regs->rax = test_thread_flag(TIF_IA32) ?
+                                       __NR_ia32_restart_syscall :
+                                       __NR_restart_syscall;
                        regs->rip -= 2;
                }
        }