您的位置:首页 > 运维架构 > Linux

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 即可成功卸载驱动
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: