From: "Paolo 'Blaisorblade' Giarrusso" <blaisorblade@yahoo.it>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] [RFC] [Oops fix] module support: record in vermagic ability to unload a module
Date: Fri, 07 Apr 2006 16:16:16 +0200 [thread overview]
Message-ID: <20060407141616.15173.53025.stgit@zion.home.lan> (raw)
From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
An UML user reported (against 2.6.13.3/UML) he got kernel Oopses when trying to
rmmod (on a kernel with module unloading enabled) a module compiled with module
unloading disabled. As crashing is a very correct thing to do in that case, a
solution is altering the vermagic string to include this too.
Possibly, however, the code should not crash in this case, even if the module
didn't support unloading - it should simply abort the module removal. In this case,
fixing that bug would be a better solution. I've not investigated though.
Thanks to Hayim for reporting.
Cc: Hayim Shaul <hayim@post.tau.ac.il>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---
include/linux/vermagic.h | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h
index fadc535..dc7c621 100644
--- a/include/linux/vermagic.h
+++ b/include/linux/vermagic.h
@@ -12,6 +12,11 @@
#else
#define MODULE_VERMAGIC_PREEMPT ""
#endif
+#ifdef CONFIG_MODULE_UNLOAD
+#define MODULE_VERMAGIC_MODULE_UNLOAD "mod_unload "
+#else
+#define MODULE_VERMAGIC_MODULE_UNLOAD ""
+#endif
#ifndef MODULE_ARCH_VERMAGIC
#define MODULE_ARCH_VERMAGIC ""
#endif
@@ -19,5 +24,5 @@
#define VERMAGIC_STRING \
UTS_RELEASE " " \
MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \
- MODULE_ARCH_VERMAGIC \
+ MODULE_VERMAGIC_MODULE_UNLOAD MODULE_ARCH_VERMAGIC \
"gcc-" __stringify(__GNUC__) "." __stringify(__GNUC_MINOR__)
next reply other threads:[~2006-04-07 14:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-07 14:16 Paolo 'Blaisorblade' Giarrusso [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-11-20 20:06 Paolo 'Blaisorblade' Giarrusso
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=20060407141616.15173.53025.stgit@zion.home.lan \
--to=blaisorblade@yahoo.it \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®