Bug report: rmmod fails to a remove side-loaded module in Busybox 1.23

AGATE Stephen stephen.agate at uk.thalesgroup.com
Fri Feb 6 11:00:07 UTC 2015


Fails with Busybox 1.23.1:

/dev/shm # ls
fpgaint.ko
//dev/shm # insmod fpgaint.ko irq=135
/dev/shm # lsmod
fpgaint 882 0 - Live 0xbf018000 (O)
/dev/shm # rmmod fpgaint
/dev/shm # lsmod
fpgaint 882 0 - Live 0xbf018000 (O)
/dev/shm #

Works with Busybox 1.22.1:

/dev/shm # insmod fpgaint.ko irq=135
/dev/shm # lsmod
fpgaint 882 0 - Live 0xbf01c000 (O)
/dev/shm # rmmod fpgaint
/dev/shm # lsmod
/dev/shm #

According to strace, "/proc/modules" is no longer opened. Here's the working trace from 1.22.1:

chdir("/lib/modules")                   = 0
uname({sys="Linux", node="(none)", ...}) = 0
chdir("3.17.8")                  = 0
open("modules.dep.bb", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2125, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6fce000
read(3, "kernel/lib/crc-ccitt.ko symbol:c"..., 4096) = 2125
read(3, "", 4096)                       = 0
### Lines below here are not seen in with Busybox 1.23.1 ###
open("/proc/modules", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6fcd000
read(4, "fpgaint 882 0 - Live 0xbf020000 "..., 1024) = 36
close(4)                                = 0
munmap(0xb6fcd000, 4096)                = 0
delete_module("fpgaint", O_NONBLOCK|0x80) = 0
exit_group(0)                           = ?
+++ exited with 0 +++


More information about the busybox mailing list