Bug 343

Summary: rmmod bug when use modprob-small.c
Product: Busybox Reporter: chenee <chenee543216>
Component: OtherAssignee: unassigned
Status: RESOLVED WORKSFORME    
Severity: enhancement CC: busybox-cvs, chenee543216
Priority: P5 Keywords: FIXME
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Linux chenee 2.6.28-12-generic #43-Ubuntu SMP Fri May 1 19:27:06 UTC 2009 i686 GNU/Linux Target: Linux (none) 2.6.24.7 #233 PREEMPT Fri May 22 10:11:14 CST 2009 armv6l GNU/Linux
Build:

Description chenee 2009-05-22 02:53:06 UTC
bug: "is this a bug or mis-use? "
It always tell me "rmmod module XXX not found",when I use "insmod" and "rmmod".
maybe the variable "info" not consider to using "rmmod" directly?
-----
file:busybox/modutils/modprobe-small.c
line:584

code:
>    if (!info) {
>        /* both dirscan and find_alias found nothing */
>        if (applet_name[0] != 'd') /* it wasn't depmod */
>            bb_error_msg("module '%s' not found", name);
>//TODO: _and_die()?
>        goto ret;
>    }
-------
output:
># insmod simple-lkm.ko
>my_module_init called.  Module is now loaded.
># rmmod simple-lkm.ko
>my_module_cleanup called.  Module is now unloaded.
>rmmod module simple-lkm not found

-------
test module file:
>/* Defines the license for this LKM */
>MODULE_LICENSE("GPL");
>/* Init function called on module entry */
>int my_module_init( void )
>{
          printk(KERN_INFO "my_module_init called.  Module is now loaded.\n");
            return 0;
>}
>/* Cleanup function called on module exit */
>void my_module_cleanup( void )
>{
>          printk(KERN_INFO "my_module_cleanup called.  Module is now >unloaded.\n");
>            return;
>}
>/* Declare entry and exit functions */
>module_init( my_module_init );
>module_exit( my_module_cleanup );
Comment 1 Denys Vlasenko 2009-05-25 23:51:42 UTC
Please attach your .config
Comment 2 Denys Vlasenko 2009-07-12 22:01:51 UTC
Closing as "works for me". Reopen if you have a better documented case: with bbox version, .config, etc.