diff options
Diffstat (limited to 'arch/x86/kernel/traps.c')
-rw-r--r-- | arch/x86/kernel/traps.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index 73b3ea32245a..3fdb20548c4b 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/ptrace.h> | 25 | #include <linux/ptrace.h> |
26 | #include <linux/uprobes.h> | ||
26 | #include <linux/string.h> | 27 | #include <linux/string.h> |
27 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
28 | #include <linux/errno.h> | 29 | #include <linux/errno.h> |
@@ -148,11 +149,11 @@ static siginfo_t *fill_trap_info(struct pt_regs *regs, int signr, int trapnr, | |||
148 | 149 | ||
149 | case X86_TRAP_DE: | 150 | case X86_TRAP_DE: |
150 | sicode = FPE_INTDIV; | 151 | sicode = FPE_INTDIV; |
151 | siaddr = regs->ip; | 152 | siaddr = uprobe_get_trap_addr(regs); |
152 | break; | 153 | break; |
153 | case X86_TRAP_UD: | 154 | case X86_TRAP_UD: |
154 | sicode = ILL_ILLOPN; | 155 | sicode = ILL_ILLOPN; |
155 | siaddr = regs->ip; | 156 | siaddr = uprobe_get_trap_addr(regs); |
156 | break; | 157 | break; |
157 | case X86_TRAP_AC: | 158 | case X86_TRAP_AC: |
158 | sicode = BUS_ADRALN; | 159 | sicode = BUS_ADRALN; |
@@ -531,7 +532,7 @@ static void math_error(struct pt_regs *regs, int error_code, int trapnr) | |||
531 | task->thread.error_code = error_code; | 532 | task->thread.error_code = error_code; |
532 | info.si_signo = SIGFPE; | 533 | info.si_signo = SIGFPE; |
533 | info.si_errno = 0; | 534 | info.si_errno = 0; |
534 | info.si_addr = (void __user *)regs->ip; | 535 | info.si_addr = (void __user *)uprobe_get_trap_addr(regs); |
535 | if (trapnr == X86_TRAP_MF) { | 536 | if (trapnr == X86_TRAP_MF) { |
536 | unsigned short cwd, swd; | 537 | unsigned short cwd, swd; |
537 | /* | 538 | /* |