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

disable autoload dlkm module

Ashes
Occasional Visitor

disable autoload dlkm module

Hi,

I have written a simple kernel module "mymod". and mknod a special file "/dev/mymod_ctl".
Here is what I do:

1. kmadmin -L mymod => module gets loaded
2. kmadmin -U mymod => module gets unloaded
3. dd if=/dev/mymod_ctl of=/dev/null count=1 => module gets loaded again by itself
4. kmadmin -U mymod => "Device busy" module unload fails

note that /dev/mymod_ctl has minor number 0 and mymod_open() and mymod_close() just return 0 if minor number is 0

What I want to know is that What is happening in steps 3 and 4 which is different than 1 and 2 as far as module loading/unloading is concerned?

How can I avoid autoloading mymod in step 3.

Please help!!