Skip to contentSkip to conversation

MODULE_FORCE_UNLOAD must depend on MODULE_UNLOAD (fwd)

PATCH New Rusty Trivial Russell 1 participant 1 message Jan 14, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MODULE_FORCE_UNLOAD must depend on MODULE_UNLOAD (fwd)

From: Adrian Bunk <[email protected]>

Hi Linus,

the patch in the mail forwarded below is still needed in 2.5.56. Rusty already stated that the patch is correct.

Please apply
Adrian

----- Forwarded message from Adrian Bunk <[email protected]> -----

Date: Wed, 8 Jan 2003 00:07:42 +0100
From: Adrian Bunk <[email protected]>
To: "Robert P. J. Day" <[email protected]>,
[email protected],
Linus Torvalds <[email protected]>
Cc: Linux kernel mailing list <[email protected]>
Subject: [2.5 patch] MODULE_FORCE_UNLOAD must depend on MODULE_UNLOAD

Quoted 7 lines · Robert P. J. Day

...
Loadable module support

Does "Module unloading" mean whether or not I can run "rmmod"?
And if I deselect this, why can I still select "Forced module unloading"? Either I can unload or I can't, no?
...

Thanks for spotting this, after reading kernel/module.c it seems obvious to me that you are right. The following simple patch fixes it:

init/Kconfig renamed from init/Kconfig.orig +1 -1
@@ -156,7 +156,7 @@
 
 config MODULE_FORCE_UNLOAD
 	bool "Forced module unloading"
-	depends on MODULES && EXPERIMENTAL
+	depends on MODULE_UNLOAD && 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
Signature · 2 lines
  Don't blame me: the Monkey is driving
  File: Adrian Bunk <[email protected]>: [2.5 patch] MODULE_FORCE_UNLOAD must depend on MODULE_UNLOAD (fwd)