hello world内核模块不能卸载,提示设备忙!
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/signal.h>
static int __init test_init()
{
printk("test_init\n");
return 0;
}
static void __exit test_exit()
{
printk("exit\n");
}
module_init(test_init);
module_cleanup(test_exit);
rmmod test就提示
ERROR: Removing 'test': Device or resource busy
lsmod看了一下test模块跟别的有点不一样
test 17920
多了个
怎么回事? 友情帮顶 哈,原来是module_exit不是module_cleanup modprobe -r test
这个命令强!
页:
[1]