Problems In Kernel Space - Module Unload Race When a module has one of its functions executed, or in the execution stack of a process/interrupt handler, unloading the module could crash the system - its code page is still in use, and yet might be re-allocated by the kernel for other purposes. Thus, a module writer must make sure that no active invocations of its functions exist when the module is unloaded. The only way to prevent a module from being unloaded, is to increase its use count (using the 'MOD_INC_USE_COUNT' macro), and decrease it to zero only when there is no method to access any of its commands.