[Devel] [PATCH rh7 09/14] Port diff-taint-message-enhanced-with-dump

Vladimir Davydov vdavydov at parallels.com
Tue Jun 23 09:29:45 PDT 2015


This patch adds an additional message on tainting kernel
(to easily find the place in huge logs) and a dump stack
because sometimes we taint kernel with the same flag (TAINT_CRAP)
in several places.

Signed-off-by: Konstantin Khorenko <khorenko at openvz.org>
=============================================================================

Author: Konstantin Khorenko
Email: khorenko at parallels.com
Subject: taint: do not print calltraces on proprietary modules
Date: Wed, 02 Apr 2014 20:08:33 +0400

After we removed patch
diff-ve-license-do-not-taint-kernel-by-modules-with-parallels-license
kernel complains (with calltraces) on all Parallels modules.

This can confuse admins => do not print additional calltraces
on proprietary modules load.

https://jira.sw.ru/browse/PSBM-25867

Signed-off-by: Konstantin Khorenko <khorenko at parallels.com>
=============================================================================

Related to https://jira.sw.ru/browse/PSBM-33650

Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
 kernel/panic.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kernel/panic.c b/kernel/panic.c
index 58520a541891..3dd43205aeb0 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -289,6 +289,11 @@ 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) {
+		printk(KERN_WARNING "Tainting kernel with flag 0x%x\n", flag);
+		dump_stack();
+	}
 	set_bit(flag, &tainted_mask);
 }
 EXPORT_SYMBOL(add_taint);
-- 
2.1.4




More information about the Devel mailing list