lkml.org 
[lkml]   [2010]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2/2] Add oops end marker to lib/bug.c WARN implementation

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>
---

Index: linux-2.6/include/linux/kernel.h
===================================================================
--- linux-2.6.orig/include/linux/kernel.h 2010-06-26 06:29:35.000000000 +1000
+++ linux-2.6/include/linux/kernel.h 2010-06-26 06:30:27.000000000 +1000
@@ -177,6 +177,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: linux-2.6/kernel/panic.c
===================================================================
--- linux-2.6.orig/kernel/panic.c 2010-06-26 06:29:35.000000000 +1000
+++ linux-2.6/kernel/panic.c 2010-06-26 06:30:05.000000000 +1000
@@ -344,7 +344,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: linux-2.6/lib/bug.c
===================================================================
--- linux-2.6.orig/lib/bug.c 2010-06-26 06:29:35.000000000 +1000
+++ linux-2.6/lib/bug.c 2010-06-26 06:31:28.000000000 +1000
@@ -166,6 +166,7 @@ enum bug_trap_type report_bug(unsigned l

print_modules();
show_regs(regs);
+ print_oops_end_marker();
add_taint(BUG_GET_TAINT(bug));
return BUG_TRAP_TYPE_WARN;
}

\
 
 \ /
  Last update: 2010-06-26 21:17    [W:6.422 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site