modulekerneldevice-driver

Device Driver, Cannot Remove rmmod: ERROR: module is in use


In attempts to remove a driver (simple_char_driver).., by running

sudo rmmmod simple_char_driver

I receive the following error.

rmmod: ERROR: Module simple_char_driver is in use

After running lsmod... it shows that its already in use by (2)

Module                  Size  Used by
helloModule            16384  0
simple_char_driver     16384  2

I would like to remove this module.

Ive looked online and no solution helps remotely!

I need help! Thank you!


Solution

  • You can use rmmod -f to force the removal. But this is unsafe and can damage other things. You can use it only if you are sure you module is isolated.

    For more info, please read here.