diff options
-rw-r--r-- | arch/i386/kernel/traps.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index 21aa1cd57773..a13037fe0ee3 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/kprobes.h> | 28 | #include <linux/kprobes.h> |
29 | #include <linux/kexec.h> | 29 | #include <linux/kexec.h> |
30 | #include <linux/unwind.h> | 30 | #include <linux/unwind.h> |
31 | #include <linux/uaccess.h> | ||
31 | 32 | ||
32 | #ifdef CONFIG_EISA | 33 | #ifdef CONFIG_EISA |
33 | #include <linux/ioport.h> | 34 | #include <linux/ioport.h> |
@@ -40,7 +41,6 @@ | |||
40 | 41 | ||
41 | #include <asm/processor.h> | 42 | #include <asm/processor.h> |
42 | #include <asm/system.h> | 43 | #include <asm/system.h> |
43 | #include <asm/uaccess.h> | ||
44 | #include <asm/io.h> | 44 | #include <asm/io.h> |
45 | #include <asm/atomic.h> | 45 | #include <asm/atomic.h> |
46 | #include <asm/debugreg.h> | 46 | #include <asm/debugreg.h> |
@@ -409,7 +409,7 @@ static void handle_BUG(struct pt_regs *regs) | |||
409 | 409 | ||
410 | if (eip < PAGE_OFFSET) | 410 | if (eip < PAGE_OFFSET) |
411 | return; | 411 | return; |
412 | if (__get_user(ud2, (unsigned short __user *)eip)) | 412 | if (probe_kernel_address((unsigned short __user *)eip, ud2)) |
413 | return; | 413 | return; |
414 | if (ud2 != 0x0b0f) | 414 | if (ud2 != 0x0b0f) |
415 | return; | 415 | return; |
@@ -422,7 +422,8 @@ static void handle_BUG(struct pt_regs *regs) | |||
422 | char *file; | 422 | char *file; |
423 | char c; | 423 | char c; |
424 | 424 | ||
425 | if (__get_user(line, (unsigned short __user *)(eip + 2))) | 425 | if (probe_kernel_address((unsigned short __user *)(eip + 2), |
426 | line)) | ||
426 | break; | 427 | break; |
427 | if (__get_user(file, (char * __user *)(eip + 4)) || | 428 | if (__get_user(file, (char * __user *)(eip + 4)) || |
428 | (unsigned long)file < PAGE_OFFSET || __get_user(c, file)) | 429 | (unsigned long)file < PAGE_OFFSET || __get_user(c, file)) |