The patch titled i386: handle_BUG(): don't print garbage if debug info unavailable has been added to the -mm tree. Its filename is i386-handle_bug-dont-print-garbage-if-debug-info.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: i386: handle_BUG(): don't print garbage if debug info unavailable From: Chuck Ebbert <76306.1226@xxxxxxxxxxxxxx> handle_BUG() tries to print file and line number even when they're not available (CONFIG_DEBUG_BUGVERBOSE is not set.) Change this to print a message stating info is unavailable instead of printing a misleading message. Signed-off-by: Chuck Ebbert <76306.1226@xxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- arch/i386/kernel/traps.c | 40 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff -puN arch/i386/kernel/traps.c~i386-handle_bug-dont-print-garbage-if-debug-info arch/i386/kernel/traps.c --- a/arch/i386/kernel/traps.c~i386-handle_bug-dont-print-garbage-if-debug-info +++ a/arch/i386/kernel/traps.c @@ -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 _ Patches currently in -mm which might be from 76306.1226@xxxxxxxxxxxxxx are origin.patch i386-print-stack-size-in-oops-messages.patch sleazy-fpu-feature-i386-support.patch i386-early-fault-handler.patch i386-require-acpi-for-numa-with-generic-architecture.patch i386-handle_bug-dont-print-garbage-if-debug-info.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html