Make rmmod -f taint kernel.
PATCH 1/1 Make rmmod -f taint kernel.
Trivial, but somehow this got lost. Mark kernel as tainted when a kernel removal is forced.
Name: Make force taint kernel.
Author: Rusty Russell
Status: Tested on 2.5.56
D: Somehow, the code which taints the kernel when rmmod -f is used got
D: lost. Restore it.
kernel/module.c +4 -1
@@ -447,7 +447,10 @@ static void free_module(struct module *m#ifdef CONFIG_MODULE_FORCE_UNLOAD static inline int try_force (unsigned int flags) { -return (flags &O_TRUNC ); +int ret = (flags &O_TRUNC ); +if (ret) + tainted |=TAINT_FORCED_MODULE ; +return ret; }#else static inline int try_force (unsigned int flags)
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.