I set up a module that makes a /proc entry using proc_register_dynamic() from my init_module(). The module works as expected, and the /proc entry does exist and is working properly, but when the module is unloaded the system becomes unstable, I think this is because I do not clean up the /proc entry. I tried using proc_unregister(), but this had no noticeable effect and I can't seem to find a simple example of a module that sets up and removes a /proc entry.
So far the module doesn't do anything useful, it's just a means to familiarize myself with the different ways to communicate between kernel and user space. So what needs to be done to remove a /proc entry before a module gets unloaded?
|