Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | From | Rusty Russell <> | Subject | [PATCH] Make rmmod -f taint kernel. | Date | Fri, 18 Jul 2003 12:06:52 +1000 |
| |
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.
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .1819-linux-2.5.69-bk3/kernel/module.c .1819-linux-2.5.69-bk3.updated/kernel/module.c --- .1819-linux-2.5.69-bk3/kernel/module.c 2003-05-05 12:37:13.000000000 +1000 +++ .1819-linux-2.5.69-bk3.updated/kernel/module.c 2003-05-09 17:22:52.000000000 +1000 @@ -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. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |