View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0016778 | administration | mirrors | public | 2019-11-28 09:12 | 2021-03-18 14:41 |
Reporter | HW_GXD | Assigned To | |||
Priority | urgent | Severity | major | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | aarch64 | OS | CentOS Linux | OS Version | release 7.7.1908 |
Summary | 0016778: remove device failed: Device or resource busy | ||||
Description | Example code is as follows: [root@localhost ]# cat hello/hello.c #include <linux/init.h> #include <linux/module.h> static int __init hello_init(void) { printk(KERN_ALERT "Hello, world\n"); return 0; } static void __exit hello_exit(void) { printk(KERN_ALERT "Goodbye, cruel world\n"); } MODULE_LICENSE("Dual BSD/GPL"); module_init(hello_init); module_exit(hello_exit); Recurrence operations: [root@localhost ]#insmod hinic.ko [root@localhost ]#dmesg [ 2479.030163] Hello, world [root@localhost ]# rmmod hello rmmod: ERROR: could not remove 'hello': Device or resource busy rmmod: ERROR: could not remove module hello: Device or resource busy | ||||
Steps To Reproduce | Firstly, install the system. Secondly, install the kernel driver: insmod hello.ko Thirdly, remove it: rmmod hello | ||||
Additional Information | My centos's version is : [root@localhost ]# uname -a Linux localhost.localdomain 4.18.0-80.7.2.el7.aarch64 #1 SMP Thu Sep 12 16:13:20 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux [root@localhost ]# cat /etc/centos-release CentOS Linux release 7.7.1908 (AltArch) | ||||
Tags | No tags attached. | ||||
We have found the reason. The inconsistency between the compiled gcc version of the kernel and the system's native gcc version caused this problem [root@localhost ~]# gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-redhat-linux/4.8.5/lto-wrapper Target: aarch64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-aarch64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-aarch64-redhat-linux/cloog-install --enable-gnu-indirect-function --build=aarch64-redhat-linux Thread model: posix gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) [root@localhost ~]# dmesg | grep gcc [ 0.000000] Linux version 4.18.0-80.7.2.el7.aarch64 (mockbuild@aarch64-01.bsys.centos.org) (gcc version 8.3.1 20190311 (Red Hat 8.3.1-3) (GCC)) #1 SMP Thu Sep 12 16:13:20 UTC 2019 |
|
How do I solve this problem? | |
I meet this problem, too. The inconsistency between the compiled gcc version of the kernel and the system's native gcc version caused this problem. [root@bogon ~]# gcc -v 使用内建 specs。 COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-redhat-linux/4.8.5/lto-wrapper 目标:aarch64-redhat-linux 配置为:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-aarch64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-aarch64-redhat-linux/cloog-install --enable-gnu-indirect-function --build=aarch64-redhat-linux 线程模型:posix gcc 版本 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) [root@bogon ~]# dmesg | grep gcc [ 0.000000] Linux version 4.18.0-193.28.1.el7.aarch64 (mockbuild@aarch64-01.bsys.centos.org) (gcc version 8.3.1 20190311 (Red Hat 8.3.1-3) (GCC)) #1 SMP Wed Oct 21 16:25:35 UTC 2020 How do I solve this problem? |
|