diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86_64/kernel/traps.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index 1dfeb07d31cc..b5e09e6b5536 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -321,13 +321,13 @@ void handle_BUG(struct pt_regs *regs) | |||
321 | if (__copy_from_user(&f, (struct bug_frame *) regs->rip, | 321 | if (__copy_from_user(&f, (struct bug_frame *) regs->rip, |
322 | sizeof(struct bug_frame))) | 322 | sizeof(struct bug_frame))) |
323 | return; | 323 | return; |
324 | if ((unsigned long)f.filename < __PAGE_OFFSET || | 324 | if (f.filename >= 0 || |
325 | f.ud2[0] != 0x0f || f.ud2[1] != 0x0b) | 325 | f.ud2[0] != 0x0f || f.ud2[1] != 0x0b) |
326 | return; | 326 | return; |
327 | if (__get_user(tmp, f.filename)) | 327 | if (__get_user(tmp, (char *)(long)f.filename)) |
328 | f.filename = "unmapped filename"; | 328 | f.filename = (int)(long)"unmapped filename"; |
329 | printk("----------- [cut here ] --------- [please bite here ] ---------\n"); | 329 | printk("----------- [cut here ] --------- [please bite here ] ---------\n"); |
330 | printk(KERN_ALERT "Kernel BUG at %.50s:%d\n", f.filename, f.line); | 330 | printk(KERN_ALERT "Kernel BUG at %.50s:%d\n", (char *)(long)f.filename, f.line); |
331 | } | 331 | } |
332 | 332 | ||
333 | #ifdef CONFIG_BUG | 333 | #ifdef CONFIG_BUG |