0

lsmod can show modules currently loaded and how many instances are using them. Just like the infomation shown below.

user@centos7:~$ lsmod | grep fuse
Module                  Size  Used by
fuse                   85681  1

I want to know exactly which instance is using the module because I want to unload the module by killing the process.

I have tried enabling CONFIG_MODULE_FORCE_UNLOAD option when compiling the kernel and typing rmmod -f fuse, but the system just freezes.

Tsyvarev
  • 60,011
  • 17
  • 110
  • 153
  • 1
    Does this answer your question? [Is there a way to figure out what is using a Linux kernel module?](https://stackoverflow.com/questions/448999/is-there-a-way-to-figure-out-what-is-using-a-linux-kernel-module) – Tsyvarev Feb 08 '23 at 21:53
  • `fuse` module provides a way for filesystems to use FUSE functionality, so the driver is likely used by some filesystem. Run `mount` and check out the mounts of type `fuse`. – Tsyvarev Feb 08 '23 at 21:55
  • @Tsyvarev thanks for comment and my problem is much easier... – Emily Green Feb 09 '23 at 07:59

1 Answers1

0

Thanks for @tsyvarev 's comment. There's no filesystem using it but when I type mount -l it shows

fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)

so I typed sudo umount /sys/fs/fuse/connections. After that I can unloaded it successfully. The problem I encountered seems much easier than the link you posted.