【问题标题】:Device Driver, Cannot Remove rmmod: ERROR: module is in use设备驱动程序,无法删除 rmmod:错误:模块正在使用中
【发布时间】:2017-02-24 02:45:35
【问题描述】:

尝试删除驱动程序 (simple_char_driver)..,通过运行

sudo rmmmod simple_char_driver

我收到以下错误。

rmmod: ERROR: Module simple_char_driver is in use

运行 lsmod... 后显示它已被 (2) 使用

Module                  Size  Used by
helloModule            16384  0
simple_char_driver     16384  2

我想删除这个模块。

我在网上查了一下,没有任何解决方案可以远程帮助!

我需要帮助!谢谢!

【问题讨论】:

  • 可能你忘记在你的模块中实现module_cleanup()函数(或使用module_exit())。没有你的模块代码,我们只能猜测。顺便说一句,您也可以查看dmesg

标签: module kernel device-driver


【解决方案1】:

您可以使用rmmod -f 强制删除。但这是不安全的,可能会损坏其他东西。 只有当您确定您的模块是隔离的时,您才能使用它。

更多信息,请阅读here

【讨论】:

    猜你喜欢
    • 2013-11-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-07
    • 2014-01-11
    • 1970-01-01
    相关资源
    最近更新 更多