modprobe -r fails if the kernel module name does not equal the filename
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
module-init-tools (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The `nvidia-current` package builds a kernel module named `nvidia-current`, but the kernel module itself is named "nvidia".
The below commands and its output should be self-explanatory.
# modprobe -v nvidia-current
insmod /lib/modules/
# modprobe -v nvidia-current
insmod /lib/modules/
# modprobe -vr nvidia-current
# modprobe -vr nvidia
FATAL: Module nvidia not found.
# rmmod nvidia-current
ERROR: Module nvidia_current does not exist in /proc/modules
# rmmod -v nvidia
rmmod nvidia, wait=no
# rmmod -v nvidia
ERROR: Module nvidia does not exist in /proc/modules
#
# modprobe -v coretemp
insmod /lib/modules/
# modprobe -v coretemp
# modprobe -vr coretemp
rmmod /lib/modules/
# modprobe -vr coretemp
#
It's not an issue specific to the nvidia module, if I rename coretemp.ko to coretemp-x.ko and run `depmod -a` afterwards, I get the same problematic behavior.
I expected that modprobe -vr nvidia-current unloads the nvidia kernel module, and that subsequent calls to modprobe -v nvidia-current do not try to insmod it again.
What happened instead was that modprobe does not see that nvidia-current is loaded and therefore tries to insmod it even if it's loaded and modprobe -r fails to find the nvidia module.
module-init-tools version: 3.12-1ubuntu6
Ubuntu version: Ubuntu 11.04 Natty
Status changed to 'Confirmed' because the bug affects multiple users.