Out of tree modules now taint the kernel, print warnings like theother kinds of taint.

From: Abhijit Hoskeri
Date: Fri Dec 16 2011 - 20:46:36 EST


Hi,

Out of tree modules now taint the kernel, print warnings like the
other kinds of taint.

commit f78b85df0b5fab5ea25f4b747aff60412d8b9b43
Author: Abhijit Hoskeri <abhijithoskeri@xxxxxxxxx>
Date: Fri Dec 16 16:00:49 2011 -0800

Out of tree modules taint the kernel, but unlike other forms of
taint, there is no warning.

Print a warning to match other forms of kernel taint.

Signed-off-by: Abhijit Hoskeri <abhijithoskeri@xxxxxxxxx>

diff --git a/kernel/module.c b/kernel/module.c
index 178333c..9e084c4 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2487,8 +2487,10 @@ static int check_modinfo(struct module *mod,
struct load_info *info)
return -ENOEXEC;
}

- if (!get_modinfo(info, "intree"))
+ if (!get_modinfo(info, "intree")) {
+ printk(KERN_WARNING "%s: out of tree module taints
kernel\n", mod->name);
add_taint_module(mod, TAINT_OOT_MODULE);
+ }

if (get_modinfo(info, "staging")) {
add_taint_module(mod, TAINT_CRAP);


Regards,
Abhijit
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/