Blob Blame History Raw
From: Libor Pechacek <lpechacek@suse.com>
Date: Wed, 13 Apr 2016 10:00:55 +0200
Subject: [PATCH] module: Inform user when loading externally supported module
Patch-mainline: never, TAINT_EXTERNAL_SUPPORT is SUSE specific
References: bsc#974406

External support flag is set silently upon module loading.  If the module gets
unloaded later on, it is almost impossible to tell which module caused the
tainting.  Let the user know when such a module is loaded for the first time.

Signed-off-by: Libor Pechacek <lpechacek@suse.com>

---
 kernel/module.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1864,9 +1864,11 @@ static int mod_sysfs_setup(struct module
 	add_notes_attrs(mod, info);
 
 #ifdef CONFIG_SUSE_KERNEL_SUPPORTED
-	if (mod->taints & (1 << TAINT_EXTERNAL_SUPPORT))
+	if (mod->taints & (1 << TAINT_EXTERNAL_SUPPORT)) {
+		pr_notice("%s: externally supported module, "
+			  "setting X kernel taint flag.\n", mod->name);
 		add_taint(TAINT_EXTERNAL_SUPPORT, LOCKDEP_STILL_OK);
-	else if (mod->taints & (1 << TAINT_NO_SUPPORT)) {
+	} else if (mod->taints & (1 << TAINT_NO_SUPPORT)) {
 		if (suse_unsupported == 0) {
 			printk(KERN_WARNING "%s: module not supported by "
 			       "SUSE, refusing to load. To override, echo "