[Devel] [PATCH rh7] kernel/panic.c: don't dump_stack() in add_taint()

Andrey Ryabinin aryabinin at virtuozzo.com
Mon Jun 4 14:47:04 MSK 2018


add_taint() callers usually call dump_stack(). The second
dump_stack() only polutes the log.

Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
 kernel/panic.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/kernel/panic.c b/kernel/panic.c
index 333e36cd1175..6d33011078d2 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -387,12 +387,6 @@ void add_taint(unsigned flag, enum lockdep_ok lockdep_ok)
 		printk(KERN_WARNING
 		       "Disabling lock debugging due to kernel taint\n");
 
-	/* Do not confuse people with calltraces on proprietary modules */
-	if (flag != TAINT_PROPRIETARY_MODULE && flag != TAINT_OOT_MODULE &&
-	    flag != TAINT_UNSIGNED_MODULE) {
-		printk(KERN_WARNING "Tainting kernel with flag 0x%x\n", flag);
-		dump_stack();
-	}
 	set_bit(flag, &tainted_mask);
 }
 EXPORT_SYMBOL(add_taint);
-- 
2.16.4



More information about the Devel mailing list