]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - lib/bug.c
Merge branch 'msi-dmi' into release
[net-next-2.6.git] / lib / bug.c
index f13daf435211eb17c0ffb3c83f3fffb3dcc03858..19552096d16b06bd2dac2a9b10212e482a4d0da3 100644 (file)
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -72,8 +72,8 @@ static const struct bug_entry *module_find_bug(unsigned long bugaddr)
        return NULL;
 }
 
-int module_bug_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs,
-                       struct module *mod)
+void module_bug_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs,
+                        struct module *mod)
 {
        char *secstrings;
        unsigned int i;
@@ -97,8 +97,6 @@ int module_bug_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs,
         * could potentially lead to deadlock and thus be counter-productive.
         */
        list_add(&mod->bug_list, &module_bug_list);
-
-       return 0;
 }
 
 void module_bug_cleanup(struct module *mod)
@@ -136,8 +134,6 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
 
        bug = find_bug(bugaddr);
 
-       printk(KERN_EMERG "------------[ cut here ]------------\n");
-
        file = NULL;
        line = 0;
        warning = 0;
@@ -156,19 +152,25 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
 
        if (warning) {
                /* this is a WARN_ON rather than BUG/BUG_ON */
+               printk(KERN_WARNING "------------[ cut here ]------------\n");
+
                if (file)
-                       printk(KERN_ERR "Badness at %s:%u\n",
+                       printk(KERN_WARNING "WARNING: at %s:%u\n",
                               file, line);
                else
-                       printk(KERN_ERR "Badness at %p "
+                       printk(KERN_WARNING "WARNING: at %p "
                               "[verbose debug info unavailable]\n",
                               (void *)bugaddr);
 
+               print_modules();
                show_regs(regs);
+               print_oops_end_marker();
                add_taint(BUG_GET_TAINT(bug));
                return BUG_TRAP_TYPE_WARN;
        }
 
+       printk(KERN_EMERG "------------[ cut here ]------------\n");
+
        if (file)
                printk(KERN_CRIT "kernel BUG at %s:%u!\n",
                       file, line);