5

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?

z0lupka
  • 275
  • 2
  • 11

1 Answers1

7

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.

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164