linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Make rmmod -f taint kernel.
@ 2003-07-18  2:06 Rusty Russell
  0 siblings, 0 replies; only message in thread
From: Rusty Russell @ 2003-07-18  2:06 UTC (permalink / raw)
  To: torvalds, akpm; +Cc: linux-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.

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-07-18  2:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-18  2:06 [PATCH] Make rmmod -f taint kernel Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).