diff options
-rw-r--r-- | arch/x86/kernel/signal_32.c | 4 | ||||
-rw-r--r-- | include/asm-x86/ptrace.h | 9 |
2 files changed, 8 insertions, 5 deletions
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c index 34fc0416b135..b1e97e80a57c 100644 --- a/arch/x86/kernel/signal_32.c +++ b/arch/x86/kernel/signal_32.c | |||
@@ -527,7 +527,7 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, | |||
527 | int ret; | 527 | int ret; |
528 | 528 | ||
529 | /* Are we from a system call? */ | 529 | /* Are we from a system call? */ |
530 | if (regs->orig_ax >= 0) { | 530 | if ((long)regs->orig_ax >= 0) { |
531 | /* If so, check system call restarting.. */ | 531 | /* If so, check system call restarting.. */ |
532 | switch (regs->ax) { | 532 | switch (regs->ax) { |
533 | case -ERESTART_RESTARTBLOCK: | 533 | case -ERESTART_RESTARTBLOCK: |
@@ -625,7 +625,7 @@ static void do_signal(struct pt_regs *regs) | |||
625 | } | 625 | } |
626 | 626 | ||
627 | /* Did we come from a system call? */ | 627 | /* Did we come from a system call? */ |
628 | if (regs->orig_ax >= 0) { | 628 | if ((long)regs->orig_ax >= 0) { |
629 | /* Restart the system call - no handlers present */ | 629 | /* Restart the system call - no handlers present */ |
630 | switch (regs->ax) { | 630 | switch (regs->ax) { |
631 | case -ERESTARTNOHAND: | 631 | case -ERESTARTNOHAND: |
diff --git a/include/asm-x86/ptrace.h b/include/asm-x86/ptrace.h index 708337a36727..bc442461ac64 100644 --- a/include/asm-x86/ptrace.h +++ b/include/asm-x86/ptrace.h | |||
@@ -42,12 +42,12 @@ struct pt_regs { | |||
42 | unsigned long si; | 42 | unsigned long si; |
43 | unsigned long di; | 43 | unsigned long di; |
44 | unsigned long bp; | 44 | unsigned long bp; |
45 | long ax; | 45 | unsigned long ax; |
46 | unsigned long ds; | 46 | unsigned long ds; |
47 | unsigned long es; | 47 | unsigned long es; |
48 | unsigned long fs; | 48 | unsigned long fs; |
49 | /* int gs; */ | 49 | /* int gs; */ |
50 | long orig_ax; | 50 | unsigned long orig_ax; |
51 | unsigned long ip; | 51 | unsigned long ip; |
52 | unsigned long cs; | 52 | unsigned long cs; |
53 | unsigned long flags; | 53 | unsigned long flags; |
@@ -145,7 +145,10 @@ extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int erro | |||
145 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where); | 145 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where); |
146 | #endif | 146 | #endif |
147 | 147 | ||
148 | #define regs_return_value(regs) ((regs)->ax) | 148 | static inline unsigned long regs_return_value(struct pt_regs *regs) |
149 | { | ||
150 | return regs->ax; | ||
151 | } | ||
149 | 152 | ||
150 | /* | 153 | /* |
151 | * user_mode_vm(regs) determines whether a register set came from user mode. | 154 | * user_mode_vm(regs) determines whether a register set came from user mode. |