Re: [PATCH] mii module broken under new scheme

Jeff Garzik (
Tue, 19 Nov 2002 13:37:06 -0500

Matt Reppert wrote:

> On Tue, 19 Nov 2002 12:51:44 -0500
> Jeff Garzik wrote:
> >Matt Reppert wrote:
> >
> >
> >>drivers/net/mii.c doesn't export module init/cleanup functions. That
> >>means it

> >ahhh! I was wondering what was up, but since I was busy with other
> >things I just compiled it into the kernel and continued on my way.
> >
> >That's a bug in the new module loader.
> Not so sure I agree ... recompiled the kernel with debugging output in
> module.c and when I try to insert mii.o without above patch it complains
> "Module has no name!" and returns -ENOEXEC from the syscall. I think
> naming mii.o would be a good idea. This may not be the best way to do
> it, but it works. (Granted, I'm not terribly familiar with all the
> modules code changes yet, but ... ) Having anonymous output in lsmod
> would be somewhat confusing :) ("Well, whatever it is, 8139too needs
> it, don't touch it!")

Your patch is fine to get people going... I'm glad you posted it on lkml
for others to benefit.

However, for inclusion in the kernel, it is not needed. Quite simply,
mii.c is essentially a library, and it needs absolutely no
initialization nor cleanup at all. Thus, it is a bug in the module
loader that any code changes at all are required.

There exists a no_module_init tag, which is in theory the proper fix for
this problem under rusty's system, but that is itself a bug: it's
redundant just like the silly EXPORT_NO_SYMBOLS tag -- it's stating the
obvious. The module loader needs to notice a lack of init_module and
exit_module and handle it accordingly.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at