modprobe -r fails if the kernel module name does not equal the filename

Bug #836291 reported by Peter Wu
12
This bug affects 2 people
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/2.6.38-11-generic/updates/dkms/nvidia-current.ko
# modprobe -v nvidia-current
insmod /lib/modules/2.6.38-11-generic/updates/dkms/nvidia-current.ko
# 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/2.6.38-11-generic/kernel/drivers/hwmon/coretemp.ko
# modprobe -v coretemp
# modprobe -vr coretemp
rmmod /lib/modules/2.6.38-11-generic/kernel/drivers/hwmon/coretemp.ko
# 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

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in module-init-tools (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.