summaryrefslogtreecommitdiffstats
path: root/include/linux/vermagic.h
diff options
context:
space:
mode:
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>2006-04-10 22:54:28 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-11 06:18:45 -0700
commit5ac90c9f78953b1a2ac937cc5a2f90c3521a710e (patch)
tree4358f489334f856690ef4a451c433829352daf19 /include/linux/vermagic.h
parent7ad04b0d0ebed1844522dd83cca0ef838d1ac673 (diff)
downloadlinux-5ac90c9f78953b1a2ac937cc5a2f90c3521a710e.tar.gz
linux-5ac90c9f78953b1a2ac937cc5a2f90c3521a710e.tar.bz2
linux-5ac90c9f78953b1a2ac937cc5a2f90c3521a710e.zip
[PATCH] module support: record in vermagic ability to unload a module
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. (akpm: a bit marginal - root screwed up and shot himself in the foot). Cc: Hayim Shaul <hayim@post.tau.ac.il> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/vermagic.h')
-rw-r--r--include/linux/vermagic.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h
index fadc535e2925..dc7c621e4647 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__)