linux卸载驱动时 Resource temporarily unavailable
2016-04-04 15:13
1001 查看
在做字符驱动驱动实验时,当要卸载驱动时,提示出现了 rmmod: sixth_drv: Resource temporarily unavailable
lsmod
Module Size Used by Not tainted
sixth_drv 4104 2
使用top命令查看
# top
Mem: 6760K used, 54424K free, 0K shrd, 0K buff, 1972K cached
CPU: 0% usr 0% sys 0% nice 12% idle 0% io 81% irq 5% softirq
Load average: 0.00 0.00 0.00
PID PPID USER STAT VSZ %MEM %CPU COMMAND
807 770 0 R 3092 5% 7% top
770 1 0 S 3096 5% 0% -sh
1 0 0 S 3092 5% 0% init
798 770 0 S 1308 2% 0% ./sixthdrvtest
762 2 0 SW< 0 0% 0% [rpciod/0]
6 2 0 SW< 0 0% 0% [khelper]
5 2 0 SW< 0 0% 0% [events/0]
745 2 0 SW< 0 0% 0% [kmmcd]
2 0 0 SW< 0 0% 0% [kthreadd]
3 2 0 SWN 0 0% 0% [ksoftirqd/0]
4 2 0 SW< 0 0% 0% [watchdog/0]
55 2 0 SW< 0 0% 0% [kblockd/0]
56 2 0 SW< 0 0% 0% [ksuspend_usbd]
59 2 0 SW< 0 0% 0% [khubd]
61 2 0 SW< 0 0% 0% [kseriod]
73 2 0 SW 0 0% 0% [pdflush]
74 2 0 SW 0 0% 0% [pdflush]
75 2 0 SW< 0 0% 0% [kswapd0]
76 2 0 SW< 0 0% 0% [aio/0]
710 2 0 SW< 0 0% 0% [mtdblockd]
发现sixthdrvtest的PID号是798,使用kill -9 798结束进程。
# kill -9 798
[1] + Killed ./sixthdrvtest
# lsmod
Module Size Used by Not tainted
sixth_drv 4104 0
退出进程后 # rmmod sixth_drv 即可成功卸载驱动
lsmod
Module Size Used by Not tainted
sixth_drv 4104 2
使用top命令查看
# top
Mem: 6760K used, 54424K free, 0K shrd, 0K buff, 1972K cached
CPU: 0% usr 0% sys 0% nice 12% idle 0% io 81% irq 5% softirq
Load average: 0.00 0.00 0.00
PID PPID USER STAT VSZ %MEM %CPU COMMAND
807 770 0 R 3092 5% 7% top
770 1 0 S 3096 5% 0% -sh
1 0 0 S 3092 5% 0% init
798 770 0 S 1308 2% 0% ./sixthdrvtest
762 2 0 SW< 0 0% 0% [rpciod/0]
6 2 0 SW< 0 0% 0% [khelper]
5 2 0 SW< 0 0% 0% [events/0]
745 2 0 SW< 0 0% 0% [kmmcd]
2 0 0 SW< 0 0% 0% [kthreadd]
3 2 0 SWN 0 0% 0% [ksoftirqd/0]
4 2 0 SW< 0 0% 0% [watchdog/0]
55 2 0 SW< 0 0% 0% [kblockd/0]
56 2 0 SW< 0 0% 0% [ksuspend_usbd]
59 2 0 SW< 0 0% 0% [khubd]
61 2 0 SW< 0 0% 0% [kseriod]
73 2 0 SW 0 0% 0% [pdflush]
74 2 0 SW 0 0% 0% [pdflush]
75 2 0 SW< 0 0% 0% [kswapd0]
76 2 0 SW< 0 0% 0% [aio/0]
710 2 0 SW< 0 0% 0% [mtdblockd]
发现sixthdrvtest的PID号是798,使用kill -9 798结束进程。
# kill -9 798
[1] + Killed ./sixthdrvtest
# lsmod
Module Size Used by Not tainted
sixth_drv 4104 0
退出进程后 # rmmod sixth_drv 即可成功卸载驱动
相关文章推荐
- Linux学习网站
- Linux文件目录详解
- linux 编译ffmpeg 支持x264, x265
- 《Linux内核分析》第七周: 可执行程序的装载
- [Zedboard Linux系统移植]-从MACHINE_START開始
- ubuntu linux基础与树莓派使用心得
- LINUX 用户及权限之我见
- centos 6.3最小化安装,无法上网解决方法
- linux server, windows SQL server 配置
- Linux源代码分析工具链
- Linux ALSA声卡驱动之五:移动设备中的ALSA(ASoC)
- Linux压缩那些事儿
- 每天一个linux命令:watch命令
- Linux下清理系统垃圾
- Linux ALSA声卡驱动之四:Control设备的创建
- Linux下date命令,格式化输出,时间设置
- Linux ALSA声卡驱动之三:PCM设备的创建
- Linux ALSA声卡驱动之二:声卡的创建
- CentOS7从ELRepo源中安装Nvidia显卡驱动
- linux grep命令