Forced module unload
PATCH 1/1 Forced module unload
This allows you to use "rmmod -f" to remove "unremovable" modules (ie. marked unsafe, still holding refcount or don't have a module_cleanup decl).
Cheers,
Rusty.
Name: Forced Module Unload
Author: Rusty Russell
Status: Experimental
Depends: Module/module.patch.gz
D: Allows the (very dangerous!) "rmmod -f" for kernel developers and
D: desperate people.
include/linux/kernel.h +1 -0
@@ -102,6 +102,7 @@ extern const char *print_tainted(void);#define TAINT_PROPRIETORY_MODULE (1<<0)#define TAINT_FORCED_MODULE (1<<1)#define TAINT_UNSAFE_SMP (1<<2) +#define TAINT_FORCED_RMMOD (1<<3)extern void dump_stack (void );
init/Kconfig +10 -0
@@ -125,6 +125,16 @@ config MODULE_UNLOAD anyway), which makes your kernel slightly smaller and simpler. If unsure, say Y. +config MODULE_FORCE_UNLOAD + bool "Forced module unloading" + depends on MODULES && EXPERIMENTAL + help + This option allows you to force a module to unload, even if the + kernel believes it is unsafe: the kernel will remove the module + without waiting for anyone to stop using it (using the -f option to + rmmod). This is mainly for kernel developers and desparate users. + If unsure, say N. + config KMOD bool "Kernel module loader" depends on MODULES
kernel/module.c +38 -15
99 lines not on this page · raw message
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.