[Bug 591] modprobe-small: incorrect alias detection

bugzilla at busybox.net bugzilla at busybox.net
Mon Sep 7 13:57:24 UTC 2009


https://bugs.busybox.net/show_bug.cgi?id=591





--- Comment #5 from Jiri J. <jirij.jabb at gmail.com>  2009-09-07 13:57:23 UTC ---
Created an attachment (id=641)
 --> (https://bugs.busybox.net/attachment.cgi?id=641)
snd_intel8x0 module load+unload, with deps

(In reply to comment #4)
> Thanks for diagnosing it!
> 
> How about this, much smaller change?
> 
> --- busybox.2/modutils/modprobe-small.c 2009-09-06 12:43:28.000000000 +0200
> +++ busybox.3/modutils/modprobe-small.c 2009-09-07 02:34:59.000000000 +0200
> @@ -218,6 +218,7 @@ static void parse_module(module_info *in
>         bksp(); /* remove last ' ' */
>         appendc('\0');
>         info->aliases = copy_stringbuf();
> +       replace(info->aliases, '-', '_');
> 
>         /* "dependency1 depandency2" */
>         reset_stringbuf();
> 
> 
> It seems to work for me. Please let me know if it doesn't work for you.
> Provide the debug log.
> 

All I can say is that it works for me. Debug logs attached, I'm sorry I
couldn't copy&paste the QEMU output, but it's not that easy in initramfs, so
instead I made another test on my primary desktop, it shows very similar
output:

/ # modprobe ide:m-tape
modprobe: loading modules.dep.bb
modprobe: process_module('ide:m-tape','(null)')
modprobe: already_loaded:0 is_rmmod:0
modprobe: process_module('ide:m_tape'): options:'(null)'
modprobe: find_alias('ide:m_tape')
modprobe: found alias 'ide:m_tape' in module 'kernel/drivers/ide/ide-tape.ko'
modprobe: recurse on dep 'ide_core'
modprobe: process_module('ide_core','(null)')
modprobe: already_loaded:1 is_rmmod:0
modprobe: nothing to do for 'ide_core'
modprobe: recurse on dep 'ide_core' done
modprobe: load_module('kernel/drivers/ide/ide-tape.ko','(null)')
modprobe: load_module:0

/ # lsmod |grep tape
ide_tape 21424 0 - Live 0xf096e000
ide_core 96136 6 ide_tape,atiixp,ide_cd_mod,ide_disk,piix,ide_pci_generic, Live
0xf0884000

/ # rmmod ide_tape
rmmod: loading modules.dep.bb
rmmod: process_module('ide_tape','(null)')
rmmod: already_loaded:1 is_rmmod:1
rmmod: find_alias('ide_tape')
rmmod: found 'ide_tape' in module 'kernel/drivers/ide/ide-tape.ko'
rmmod: recurse on dep 'ide_core'
rmmod: process_module('ide_core','(null)')
rmmod: already_loaded:1 is_rmmod:1
rmmod: find_alias('ide_core')
rmmod: found 'ide_core' in module 'kernel/drivers/ide/ide-core.ko'
rmmod: remove 'ide_core': Resource temporarily unavailable
rmmod: recurse on dep 'ide_core' done

/ #

As for more complicated testing with involved dependencies and aliases, I
managed to successfully unload and load snd_intel8x0 module with all it's
dependencies, few of them depending on the replace call. The log is provided as
an attachment.
Note that recursive module unloading should be performed only with modprobe -r,
not with rmmod (module-init-tools version 3.4), but that belongs to another bug
entry.


-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list