Removing a module even if use count is not zero
hello linux-experts,
I inserted my module into the running kernel that
intercepts read system call. I am using kernel 2.4.28. Now, I am unable to remove it since each and every time, the module is used by some process. How can I remove the module even if the usecount is not zero?
Can anyone help me regarding this?
Thanks,
selva
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo
Quoted 11 lines · selvakumar nagendran
hello linux-experts,
I inserted my module into the running kernel that
intercepts read system call. I am using kernel 2.4.28. Now, I am unable to remove it since each and every time, the module is used by some process. How can I remove the module even if the usecount is not zero?
Can anyone help me regarding this?Thanks,
selva
Reboot. If you remove it, the system will likely crash.
--
Brian Gerst
Quoted 7 lines · selvakumar nagendran
hello linux-experts,
I inserted my module into the running kernel that
intercepts read system call. I am using kernel 2.4.28. Now, I am unable to remove it since each and every time, the module is used by some process. How can I remove the module even if the usecount is not zero?
Can anyone help me regarding this?
As already said, you need to reboot.
To fix this in the future, export a /proc entry that when written to causes your module to properly clean everything up and prevent anyone from getting new accesses. This then allows you to remove the module cleanly. Note that it may not be possible to cleanly deregister, depending on what your module is doing.
Chris
exporting /proc entry for module
Quoted 11 lines · --- Chris Friesen
To fix this in the future, export a /proc entry that when written to
causes your module to properly clean everything up and prevent anyone
from getting new accesses. This then allows you to remove the module
cleanly. Note that it may not be possible to cleanly deregister,
depending on what your module is doing.Chris
How can I export a /proc entry for my module?
Regards,
selva
__________________________________
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
http://my.yahoo.com
Re: exporting /proc entry for module
Quoted 10 lines · selvakumar nagendran
Quoted 6 lines · --- Chris Friesen
To fix this in the future, export a /proc entry that
when written to causes your module to properly clean everything up and prevent anyone from getting new accesses. This then allows you to remove the module cleanly. Note that it may not be possible to cleanly deregister, depending on what your module is doing.How can I export a /proc entry for my module?
. . . . . . . . . .
You can study the valuable documents at
http://kernelnewbies.org/documents/
or google for other procfs example source code,
which should find several examples for you,
such as http://www.xenotime.net/linux/procfs_ex/
Signature · 1 line
~Randy