Index: linux-2.6.10-rc2-bk11-Module/net/sctp/protocol.c =================================================================== --- linux-2.6.10-rc2-bk11-Module.orig/net/sctp/protocol.c 2004-11-29 07:48:59.000000000 +1100 +++ linux-2.6.10-rc2-bk11-Module/net/sctp/protocol.c 2004-11-30 09:04:13.357886712 +1100 @@ -1159,7 +1159,6 @@ sctp_get_local_addr_list(); - __unsafe(THIS_MODULE); status = 0; out: return status; @@ -1195,6 +1194,7 @@ goto out; } +#if 0 /* Unsafe to remove */ /* Exit handler for the SCTP protocol. */ __exit void sctp_exit(void) { @@ -1235,9 +1235,10 @@ inet_unregister_protosw(&sctp_stream_protosw); sk_free_slab(&sctp_prot); } +module_exit(sctp_exit); +#endif module_init(sctp_init); -module_exit(sctp_exit); MODULE_AUTHOR("Linux Kernel SCTP developers "); MODULE_DESCRIPTION("Support for the SCTP protocol (RFC2960)"); Index: linux-2.6.10-rc2-bk11-Module/kernel/module.c =================================================================== --- linux-2.6.10-rc2-bk11-Module.orig/kernel/module.c 2004-11-29 22:18:59.000000000 +1100 +++ linux-2.6.10-rc2-bk11-Module/kernel/module.c 2004-11-29 23:11:37.000000000 +1100 @@ -588,7 +588,7 @@ } /* Init and exit functions must balance to unload. */ - if (!can_unload(mod) || mod->unsafe) { + if (!can_unload(mod)) { forced = try_force(flags); if (!forced) { /* This module can't be removed */ @@ -640,11 +640,6 @@ seq_printf(m, "%s,", use->module_which_uses->name); } - if (mod->unsafe) { - printed_something = 1; - seq_printf(m, "[unsafe],"); - } - if (can_unload(mod)) { printed_something = 1; seq_printf(m, "[permanent],"); @@ -1895,8 +1890,8 @@ unwind_iepairs: /* If made active, it shouldn't be failing! */ - if (mod->state == MODULE_STATE_LIVE) - __unsafe(mod); + WARN_ON(mod->state == MODULE_STATE_LIVE); + /* Init routine failed: abort. Try to protect us from buggy refcounters. */ spin_lock_irq(&modlist_lock); Index: linux-2.6.10-rc2-bk11-Module/include/linux/module.h =================================================================== --- linux-2.6.10-rc2-bk11-Module.orig/include/linux/module.h 2004-11-29 23:11:36.000000000 +1100 +++ linux-2.6.10-rc2-bk11-Module/include/linux/module.h 2004-11-29 23:11:37.000000000 +1100 @@ -273,9 +273,6 @@ /* Arch-specific module values */ struct mod_arch_specific arch; - /* Am I unsafe to unload? */ - int unsafe; - /* Am I GPL-compatible */ int license_gplok; @@ -409,16 +406,6 @@ extern void module_make_live(struct module *module); -#define __unsafe(mod) \ -do { \ - if (mod && !(mod)->unsafe) { \ - printk(KERN_WARNING \ - "Module %s cannot be unloaded due to unsafe usage in" \ - " %s:%u\n", (mod)->name, __FILE__, __LINE__); \ - (mod)->unsafe = 1; \ - } \ -} while(0) - /* For kallsyms to ask for address resolution. NULL means not found. */ const char *module_address_lookup(unsigned long addr, unsigned long *symbolsize, @@ -482,8 +469,6 @@ #define module_make_live(mod) -#define __unsafe(mod) - /* For kallsyms to ask for address resolution. NULL means not found. */ static inline const char *module_address_lookup(unsigned long addr, unsigned long *symbolsize,