LINUX driver learning: How to Solve Deviceorresourcebusy when loading a module

Source: Internet
Author: User
LINUX driver learning: How to Solve Deviceorresourcebusy when loading a module-Linux general technology-Linux programming and kernel information. For more information, see the following. After the globalmem driver module is compiled, the following error message is displayed when the module is loaded through insmod:

Linux-olyaim:/usr/src/source/globalmem # insmod globalmem. ko

Insmod: error inserting 'globalmem. ko':-1 Device or resource busy

Because it was the first LINUX driver and the LINUX operating system installed through VMware. I suspected it was a problem with the operating system. Later I thought about it. Since all the modules have been compiled, there should be no problem with the system.

Just in the cold mood, I knocked on the following command: linux-olyaim:/usr/src/source/globalmem # cat/proc/devices

Character devices:

1 mem
2 pty
3 ttyp
4/dev/vc/0
4 tty
4 ttyS
5/dev/tty
5/dev/console
5/dev/ptmx
6 lp
7 vcs
10 misc
13 input
21 sg
29 fb
128 ptm
136 pts
180 usb
189 usb_device
254 vmci

Block devices:
1 ramdisk
2 fd
7 loop
8 sd
9 md
22 ide1
65 sd
66 sd
67 sd
68 sd
69 sd
70 sd
71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
253 device-mapper
254 mdp

It suddenly occurred that the master device number set in the globalmem program is also 254, and there should be a conflict with the above vmci. The above prompt is displayed only when loading.

Solution: replace the number of the master device that is not used in the preceding table, or directly assign the number to the system automatically.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.