LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   unable to remove kernel module........ (https://www.linuxquestions.org/questions/linux-software-2/unable-to-remove-kernel-module-428840/)

dogslayer 03-26-2006 11:13 PM

unable to remove kernel module........
 
hey guys..... recently i tried out the packet filter code given in linux journal.....its a kernel module using netfilter hooks and all.....thing is that i was able to insert the module using "insmod" but cudnt remove the module using "rmmod" i had to restart the comp to remove the module.......
can smeone tell me how to remove the module without restarting, whn rmmod dosent work....\

by,
dogslayer

rkelsen 03-26-2006 11:29 PM

With 2.6 series kernels, module unloading can be enabled or disabled in the kernel configuration. In your case, it sounds like it is disabled.

dogslayer 03-26-2006 11:32 PM

no dude am able to unload other modules using "rmmod" its only for this packet filter module am hving problem wid....
and iam using fc4...which by default supports unloading and loading of modules.......

btmiller 03-26-2006 11:37 PM

If you look at lsmod do any other modules depend on that module? I don't think the ekrnel will let you remove a module when dependant modules are loaded.

dogslayer 03-26-2006 11:47 PM

its actually an personally built and compiled module..... i dont think it has any other dependencies.....

rkelsen 03-27-2006 12:21 AM

Try "forcing" it to unload with "rmmod -f modulename"

For this to work, CONFIG_MODULE_FORCE_UNLOAD must also be enabled in your kernel config...

There must be a reason your kernel isn't unloading the module. Generally, it will only allow modules to unload if it is "safe" to do so.

rahulk 03-27-2006 12:26 AM

hmm,

actually rmmod checks two things
1. any dependency
2. if the module is not used

here the issue seems like that the module is being used up by some process even if it is not having any dependency. Try to figure out any service or process which is using that module, after the service is stopped or the process killed, you can actually use rmmod to unload the module. always remember to use the -e option to save the persistant data otherwise you might loose some data.

-Rahul.


All times are GMT -5. The time now is 03:04 PM.