4

In this post there is some explanation about why does lsmod show -2 in 'used by' column. The idea is that the kernel config option CONFIG_MODULE_UNLOAD was not set.

But what if lsmod shows -1 only for one specific module while CONFIG_MODULE_UNLOAD is set in my current kernel? How to debug this muddle?

  • Does /sys/module/<module>/refcnt exist for that specific module? If so, what does it contain? – Stephen Kitt Oct 10 '18 at 9:13
  • @StephenKitt It contains -1 too. – z0lupka Oct 10 '18 at 9:29
5

A module reference count of -1, visible both in /sys/module/<module>/refcnt and in lsmod’s output, means that the module is currently unloading.

If a module’s reference count stays at -1, that indicates a problem — dmesg should tell you more.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.