Re: Taint kernel after WARN_ON(condition) v2

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Haavard Skinnemoen
Date: Wednesday, February 13, 2008 - 7:55 am

On Wed, 13 Feb 2008 22:27:40 +0800
Nur Hussein <nurhussein@gmail.com> wrote:


Hmm. Relying on the generic code in lib/bug.c qualifies as "own
definition" these days? I think the patch below should take care of all
four...unless I've misunderstood something.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>

diff --git a/lib/bug.c b/lib/bug.c
index 530f38f..0d67419 100644
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -35,6 +35,7 @@
 
     Jeremy Fitzhardinge <jeremy@goop.org> 2006
  */
+#include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/module.h>
 #include <linux/bug.h>
@@ -149,6 +150,7 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
 			       (void *)bugaddr);
 
 		show_regs(regs);
+		add_taint(TAINT_WARN);
 		return BUG_TRAP_TYPE_WARN;
 	}
 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Taint kernel after WARN_ON(condition) v2, Nur Hussein, (Wed Feb 13, 7:27 am)
Re: Taint kernel after WARN_ON(condition) v2, Haavard Skinnemoen, (Wed Feb 13, 7:55 am)
Re: Taint kernel after WARN_ON(condition) v2, Paul Mundt, (Wed May 14, 9:06 pm)
Re: Taint kernel after WARN_ON(condition) v2, Andrew Morton, (Thu May 15, 4:51 pm)
Re: Taint kernel after WARN_ON(condition) v2, Paul Mundt, (Thu May 15, 9:51 pm)