Re: Removing a module even if use count is not zero
From: Chris Friesen
Date: Wed Jan 12 2005 - 10:24:58 EST
selvakumar nagendran wrote:
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/