diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2007-10-17 02:26:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 11:42:49 -0400 |
commit | af49d9248fca6f26cbdb01918334f71d9040df80 (patch) | |
tree | 5d6a7f4d5ca55ff17fbfc98cacac37be62c7a4a3 /include | |
parent | d9c9bef1345e5d9258febce2a37e4d40319fa728 (diff) |
Remove "unsafe" from module struct
Adrian Bunk points out that "unsafe" was used to mark modules touched by
the deprecated MOD_INC_USE_COUNT interface, which has long gone. It's time
to remove the member from the module structure, as well.
If you want a module which can't unload, don't register an exit function.
(Vlad Yasevich says SCTP is now safe to unload, so just remove the
__unsafe there).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Cc: Sridhar Samudrala <sri@us.ibm.com>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/module.h | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index b6a646cea1cb..5523e10fb2f0 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -312,9 +312,6 @@ struct module | |||
312 | /* Arch-specific module values */ | 312 | /* Arch-specific module values */ |
313 | struct mod_arch_specific arch; | 313 | struct mod_arch_specific arch; |
314 | 314 | ||
315 | /* Am I unsafe to unload? */ | ||
316 | int unsafe; | ||
317 | |||
318 | unsigned int taints; /* same bits as kernel:tainted */ | 315 | unsigned int taints; /* same bits as kernel:tainted */ |
319 | 316 | ||
320 | #ifdef CONFIG_GENERIC_BUG | 317 | #ifdef CONFIG_GENERIC_BUG |
@@ -441,16 +438,6 @@ static inline void __module_get(struct module *module) | |||
441 | __mod ? __mod->name : "kernel"; \ | 438 | __mod ? __mod->name : "kernel"; \ |
442 | }) | 439 | }) |
443 | 440 | ||
444 | #define __unsafe(mod) \ | ||
445 | do { \ | ||
446 | if (mod && !(mod)->unsafe) { \ | ||
447 | printk(KERN_WARNING \ | ||
448 | "Module %s cannot be unloaded due to unsafe usage in" \ | ||
449 | " %s:%u\n", (mod)->name, __FILE__, __LINE__); \ | ||
450 | (mod)->unsafe = 1; \ | ||
451 | } \ | ||
452 | } while(0) | ||
453 | |||
454 | /* For kallsyms to ask for address resolution. NULL means not found. */ | 441 | /* For kallsyms to ask for address resolution. NULL means not found. */ |
455 | const char *module_address_lookup(unsigned long addr, | 442 | const char *module_address_lookup(unsigned long addr, |
456 | unsigned long *symbolsize, | 443 | unsigned long *symbolsize, |
@@ -518,8 +505,6 @@ static inline void module_put(struct module *module) | |||
518 | 505 | ||
519 | #define module_name(mod) "kernel" | 506 | #define module_name(mod) "kernel" |
520 | 507 | ||
521 | #define __unsafe(mod) | ||
522 | |||
523 | /* For kallsyms to ask for address resolution. NULL means not found. */ | 508 | /* For kallsyms to ask for address resolution. NULL means not found. */ |
524 | static inline const char *module_address_lookup(unsigned long addr, | 509 | static inline const char *module_address_lookup(unsigned long addr, |
525 | unsigned long *symbolsize, | 510 | unsigned long *symbolsize, |