lib/bug.c: add oops end marker to WARN implementation
authorAnton Blanchard <anton@samba.org>
Wed, 11 Aug 2010 01:03:30 +0000 (18:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Aug 2010 15:59:22 +0000 (08:59 -0700)
We are missing the oops end marker for the exception based WARN implementation
in lib/bug.c. This is useful for logfile analysis tools.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/kernel.h
kernel/panic.c
lib/bug.c

index 452833d67b211a97014fd77f5b8ee1424a94ac7a..d848cb85465555f289ab93ee8ef6269a52d3f747 100644 (file)
@@ -182,6 +182,7 @@ NORET_TYPE void panic(const char * fmt, ...)
        __attribute__ ((NORET_AND format (printf, 1, 2))) __cold;
 extern void oops_enter(void);
 extern void oops_exit(void);
+void print_oops_end_marker(void);
 extern int oops_may_print(void);
 NORET_TYPE void do_exit(long error_code)
        ATTRIB_NORET;
index 3e9037ae10e15ba0372d724846a89b4a6c651533..4c13b1a88ebbf0a6044da356926a2be0c92aaff8 100644 (file)
@@ -338,7 +338,7 @@ static int init_oops_id(void)
 }
 late_initcall(init_oops_id);
 
-static void print_oops_end_marker(void)
+void print_oops_end_marker(void)
 {
        init_oops_id();
        printk(KERN_WARNING "---[ end trace %016llx ]---\n",
index 6c5b30cf3f0f036af1c999595d6a46907be766d3..7cdfad88128fa5d3d3076d552fbde276ef500d66 100644 (file)
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -166,6 +166,7 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
 
                print_modules();
                show_regs(regs);
+               print_oops_end_marker();
                add_taint(BUG_GET_TAINT(bug));
                return BUG_TRAP_TYPE_WARN;
        }