diff options
Diffstat (limited to 'arch/x86/kernel/signal_32.c')
-rw-r--r-- | arch/x86/kernel/signal_32.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c index b21070ea33a4..3e4a688bb84f 100644 --- a/arch/x86/kernel/signal_32.c +++ b/arch/x86/kernel/signal_32.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/uaccess.h> | 27 | #include <asm/uaccess.h> |
28 | #include <asm/i387.h> | 28 | #include <asm/i387.h> |
29 | #include <asm/vdso.h> | 29 | #include <asm/vdso.h> |
30 | #include <asm/syscall.h> | ||
30 | #include <asm/syscalls.h> | 31 | #include <asm/syscalls.h> |
31 | 32 | ||
32 | #include "sigframe.h" | 33 | #include "sigframe.h" |
@@ -507,9 +508,9 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, | |||
507 | int ret; | 508 | int ret; |
508 | 509 | ||
509 | /* Are we from a system call? */ | 510 | /* Are we from a system call? */ |
510 | if ((long)regs->orig_ax >= 0) { | 511 | if (syscall_get_nr(current, regs) >= 0) { |
511 | /* If so, check system call restarting.. */ | 512 | /* If so, check system call restarting.. */ |
512 | switch (regs->ax) { | 513 | switch (syscall_get_error(current, regs)) { |
513 | case -ERESTART_RESTARTBLOCK: | 514 | case -ERESTART_RESTARTBLOCK: |
514 | case -ERESTARTNOHAND: | 515 | case -ERESTARTNOHAND: |
515 | regs->ax = -EINTR; | 516 | regs->ax = -EINTR; |
@@ -623,9 +624,9 @@ static void do_signal(struct pt_regs *regs) | |||
623 | } | 624 | } |
624 | 625 | ||
625 | /* Did we come from a system call? */ | 626 | /* Did we come from a system call? */ |
626 | if ((long)regs->orig_ax >= 0) { | 627 | if (syscall_get_nr(current, regs) >= 0) { |
627 | /* Restart the system call - no handlers present */ | 628 | /* Restart the system call - no handlers present */ |
628 | switch (regs->ax) { | 629 | switch (syscall_get_error(current, regs)) { |
629 | case -ERESTARTNOHAND: | 630 | case -ERESTARTNOHAND: |
630 | case -ERESTARTSYS: | 631 | case -ERESTARTSYS: |
631 | case -ERESTARTNOINTR: | 632 | case -ERESTARTNOINTR: |