Reputation: 325
What happens when module_exit
is triggered, while the module is still running? And Is it possible that the module will still run afterwards?
Upvotes: 0
Views: 201
Reputation: 16441
Once module_exit
has returned, nothing in the module should run. If something does, the system will likely panic when the module's memory is released.
You must either:
1. Prevent this by holding a reference on the module, and not releasing it as long as anything can run.
2. Unregister all hooks you've registered in module_exit
and use proper synchronization, to assure that everything which was running has stopped.
Upvotes: 3