linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: torvalds@transmeta.com, akpm@zip.com.au
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Make rmmod -f taint kernel.
Date: Fri, 18 Jul 2003 12:06:52 +1000	[thread overview]
Message-ID: <20030718021559.0CF2A2C54F@lists.samba.org> (raw)

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.

                 reply	other threads:[~2003-07-18  2:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030718021559.0CF2A2C54F@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).