[Bug 7034] modprobe misunderstands some modaliases and fails to load

bugzilla at busybox.net bugzilla at busybox.net
Sat Apr 19 13:00:10 UTC 2014


Denys Vlasenko <vda.linux at googlemail.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |ASSIGNED

--- Comment #2 from Denys Vlasenko <vda.linux at googlemail.com> 2014-04-19 13:00:10 UTC ---
Ah, you are talking about modules.dep.bb, it means you are using

I am trying to reproduce this bug.
This is on Fedora 18 machine:
I built current git with CONFIG_MODPROBE_SMALL=y.
Ran "busybox depmod", it generated /lib/modules/3.10.11/modules.dep.bb
and I do have an entry there for pata_via:

kernel/drivers/ata/pata_via.ko pci:v00001106d00009001sv*sd*bc*sc*i*
pci:v00001106d0000C409sv*sd*bc*sc*i* pci:v00001106d00005324sv*sd*bc*sc*i*
pci:v00001106d00003164sv*sd*bc*sc*i* pci:v00001106d00001571sv*sd*bc*sc*i*
pci:v00001106d00000581sv*sd*bc*sc*i* pci:v00001106d00000571sv*sd*bc*sc*i*

Now I enable debugging in modprobe_small.c:

#if 0   <============ HERE changed to 0
# define dbg1_error_msg(...) ((void)0)
# define dbg2_error_msg(...) ((void)0)
# define dbg1_error_msg(...) bb_error_msg(__VA_ARGS__)
# define dbg2_error_msg(...) bb_error_msg(__VA_ARGS__)

and I try to modprobe the alias which doesn't work for you:

# ./busybox modprobe pci:v00001106d00000571sv00001509sd00009022bc01sc01i8a
modprobe: loading modules.dep.bb
modprobe: already_loaded:0 is_rmmod:0
modprobe: find_alias('pci:v00001106d00000571sv00001509sd00009022bc01sc01i8a')
modprobe: found alias 'pci:v00001106d00000571sv00001509sd00009022bc01sc01i8a'
in module 'kernel/drivers/ata/pata_via.ko'
modprobe: load_module('kernel/drivers/ata/pata_via.ko','(null)')
modprobe: load_module:0

As you see, it works for me.
In particular, the match triggered here:

                /* Does matching substring exist? */
                for (s = desc; *s; s += strlen(s) + 1) {
                        /* Aliases in module bodies can be defined with
                         * shell patterns. Example:
                         * "pci:v000010DEd000000D9sv*sd*bc*sc*i*".
                         * Plain strcmp() won't catch that */
                        if (fnmatch(s, alias, 0) == 0) {
                                dbg1_error_msg("found alias '%s' in module
                                                alias, modinfo[i].pathname);
                                result = &modinfo[i];

Please enable debugging in modprobe_small.c, run modprobe and tell me what it
Please try current git.
Please attach your modules.dep.bb.

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