Bug 263

Summary: modutils/rmmod can't remove modules with dash in name on 2.4 kernels
Product: Busybox Reporter: Leonid <lly.dev>
Component: OtherAssignee: unassigned
Status: VERIFIED FIXED    
Severity: normal CC: busybox-cvs
Priority: P2    
Version: 1.13.x   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Host: Target: linux-mips
Build: 1.13.3
Attachments: Fix

Description Leonid 2009-04-05 08:09:40 UTC
Created attachment 227 [details]
Fix

It is impossible to remove modules with dash in name on 2.4 kernels. This happens on MIPS32 platform, 2.4.37 Linux kernel & uClibc 0.9.29.

Example:
===============================================================================
$ lsmod
    Tainted: P
usb-uhci               27380   0 (unused)
usb-storage            63312   0 (unused)
sd_mod                 12660   0 (unused)
scsi_mod               72624   1 [usb-storage sd_mod]
ehci-hcd               28180   0 (unused)
usbcore                76144   1 [usb-uhci usb-storage ehci-hcd]
wl                    897336   0 (unused)
et                     29088   0 (unused)
$ rmmod usb-uhci
rmmod: cannot unload 'usb_uhci': unknown symbol in module, or unknown parameter
===============================================================================

I apologize that happens due to unwanted filename2modname() call in rmmod_main() for old 2.4 kernels. Patch attached solves problem for me.
Comment 1 Denys Vlasenko 2009-04-13 02:26:06 UTC
Applied as rev. 26081, thanks!