mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: akpm@linux-foundation.org, mingo@elte.hu, arjan@linux.intel.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] Add oops end marker to lib/bug.c WARN implementation
Date: Sun, 27 Jun 2010 05:13:09 +1000	[thread overview]
Message-ID: <20100626191309.GB2345@kryten> (raw)
In-Reply-To: <20100626191059.GA2345@kryten>


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

  reply	other threads:[~2010-06-26 19:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-26 19:10 [PATCH 1/2] Make lib/bug.c WARN implementation match the kernel/panic.c one Anton Blanchard
2010-06-26 19:13 ` Anton Blanchard [this message]
2010-06-26 19:54 ` Kirill A. Shutemov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100626191309.GB2345@kryten \
    --to=anton@samba.org \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®