Can't cleanly unload driver

Eric Fowler eric.fowler at
Thu Dec 26 20:50:52 EST 2013

I am trying to load/unload a basic driver skeleton.

I did an insmod ./mydriver.ko
, then a
mknod /dev/mydriver0 c <major #> 0
, then a
ln -sf mydriver0 /dev/mydriver

All is well. Now to unload

rmmod mydriver
rm -f /dev/mydriver
rm -f /dev/mydriver0

But rmmod reports Module mydriver is not currently loaded.

But it is in /proc/devices:
248 mydriver

Trying to reload it gives:
insmod ./mydriver.ko

Could not insert module mydriver.ko: File exists.

I could reboot .... again ... but what is wrong?

I have source for the driver, as I am developing it.

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Kernelnewbies mailing list