lkml.org 
[lkml]   [2003]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] Make rmmod -f taint kernel.
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:46    [W:1.086 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site