System Administration
Showing results for 
Search instead for 
Did you mean: 

unable to remove a kernel module on 11iv3

Occasional Visitor

unable to remove a kernel module on 11iv3


I have a dynamically loadable pseudo kernel module (WSIO class) running in the system (HP-UX 11iv3 PA-RISC), but cannot remove it via kcmodule. It reports the module is busy. However the mod_unload entry point (_unload function) of the kernel module is not invoked. There is no application accessing/openning that device file served by the module at that moment. There is also no other kernel modules depending on this module.

This problem can not be always reproducible.

Any hints about the root cause of this problem? or any sugguestions for further troubleshooting?

According to the DLKM guide:

"The system will never attempt to unload a module that it thinks is busy. However, the system cannot determine under all cases when the module is in use. Currently, a module is considered to be busy when another module that depends on it is also loaded. In addition, WSIO class drivers and STREAMS drivers track the open() and close() calls; these types of modules are busy whenever there is at least one open on the device using the driver. Under most other circumstances, the module must determine for itself whether it is appropriate for it to be unloaded. When a module is still in use, its _unload() function can return a nonzero value to cancel the unload."

Steven E. Protter
Exalted Contributor

Re: unable to remove a kernel module on 11iv3


To clear this, you will probably have to reboot.

I've seen behavior like this before and would check the patch database for related kernel patches.

Most (probably all) kernel patches do require a reboot.

Steven E Protter
Owner of ISN Corporation