Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 32619
b: refs/heads/master
c: b701533
h: refs/heads/master
i:
  32617: ebd6567
  32615: 63a71a1
v: v3
  • Loading branch information
Chuck Ebbert authored and Linus Torvalds committed Jul 15, 2006
1 parent 7545ad2 commit 67c484e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c38c8db7225465c8d124f38b24d3024decc26bbd
refs/heads/master: b7015331098cc156c30282588bbd30bbf7a59291
40 changes: 20 additions & 20 deletions trunk/arch/i386/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,35 +324,35 @@ void show_registers(struct pt_regs *regs)

static void handle_BUG(struct pt_regs *regs)
{
unsigned long eip = regs->eip;
unsigned short ud2;
unsigned short line;
char *file;
char c;
unsigned long eip;

eip = regs->eip;

if (eip < PAGE_OFFSET)
goto no_bug;
return;
if (__get_user(ud2, (unsigned short __user *)eip))
goto no_bug;
return;
if (ud2 != 0x0b0f)
goto no_bug;
if (__get_user(line, (unsigned short __user *)(eip + 2)))
goto bug;
if (__get_user(file, (char * __user *)(eip + 4)) ||
(unsigned long)file < PAGE_OFFSET || __get_user(c, file))
file = "<bad filename>";
return;

printk(KERN_EMERG "------------[ cut here ]------------\n");
printk(KERN_EMERG "kernel BUG at %s:%d!\n", file, line);

no_bug:
return;
#ifdef CONFIG_DEBUG_BUGVERBOSE
do {
unsigned short line;
char *file;
char c;

/* Here we know it was a BUG but file-n-line is unavailable */
bug:
printk(KERN_EMERG "Kernel BUG\n");
if (__get_user(line, (unsigned short __user *)(eip + 2)))
break;
if (__get_user(file, (char * __user *)(eip + 4)) ||
(unsigned long)file < PAGE_OFFSET || __get_user(c, file))
file = "<bad filename>";

printk(KERN_EMERG "kernel BUG at %s:%d!\n", file, line);
return;
} while (0);
#endif
printk(KERN_EMERG "Kernel BUG at [verbose debug info unavailable]\n");
}

/* This is gone through when something in the kernel
Expand Down

0 comments on commit 67c484e

Please sign in to comment.