2002-01-22 22:17:11

by Kris Karas

[permalink] [raw]
Subject: [Patch - 2.4.17++] Fix undefined ksym in minix.o, ext2.o, sysv.o

Marcelo, et al,

Compiling minix as a module results in an unresolved symbol,
waitfor_one_page:

pinhead:~# depmod -a -e
depmod: *** Unresolved symbols in
/lib/modules/BootsAs/n18p4/kernel/fs/minix/minix.o
depmod: waitfor_one_page
pinhead:~#

Looks as if EXT2 and SYSV are also affected.

Trivial patch [tested on i386] appended.

Kris

##################

--- linux-2.4.18p6/kernel/ksyms.c Tue Jan 22 17:12:25 2002
+++ linux/kernel/ksyms.c Tue Jan 22 17:01:25 2002
@@ -268,6 +268,9 @@
EXPORT_SYMBOL(lock_may_read);
EXPORT_SYMBOL(lock_may_write);
EXPORT_SYMBOL(dcache_readdir);
+#if defined(CONFIG_EXT2_FS)||defined(CONFIG_MINIX_FS)||defined(CONFIG_SYSV_FS)
+EXPORT_SYMBOL(waitfor_one_page);
+#endif

/* for stackable file systems (lofs, wrapfs, cryptfs, etc.) */
EXPORT_SYMBOL(default_llseek);


2002-01-22 22:32:31

by Jeff Garzik

[permalink] [raw]
Subject: Re: [Patch - 2.4.17++] Fix undefined ksym in minix.o, ext2.o, sysv.o

"Kristofer T. Karas" wrote:
> +#if defined(CONFIG_EXT2_FS)||defined(CONFIG_MINIX_FS)||defined(CONFIG_SYSV_FS)
> +EXPORT_SYMBOL(waitfor_one_page);
> +#endif

No, it needs to be exported unconditionally.

--
Jeff Garzik | "I went through my candy like hot oatmeal
Building 1024 | through an internally-buttered weasel."
MandrakeSoft | - goats.com

2002-01-22 22:37:32

by Kristofer T. Karas

[permalink] [raw]
Subject: Re: [Patch - 2.4.17++] Fix undefined ksym in minix.o, ext2.o, sysv.o

On Tuesday 22 January 2002 05:32 pm, Jeff Garzik wrote:
> "Kristofer T. Karas" wrote:
> > +EXPORT_SYMBOL(waitfor_one_page);
> No, it needs to be exported unconditionally.

Fair enough. A "grep -r" showed it existing only in ./fs/ and only ref'd by
ext2, sysv and minix; so I figured a conditional wrap-around wouldn't hurt.
But I didn't stop to consider 3rd party modules...

Kris

2002-01-22 23:59:55

by David Woodhouse

[permalink] [raw]
Subject: Re: [Patch - 2.4.17++] Fix undefined ksym in minix.o, ext2.o, sysv.o


[email protected] said:
> Fair enough. A "grep -r" showed it existing only in ./fs/ and only
> ref'd by ext2, sysv and minix; so I figured a conditional wrap-around
> wouldn't hurt. But I didn't stop to consider 3rd party modules...

It's not just third-party modules. Even the modules in the tree get bitten
by such brokenness - consider what happens if you compile your kernel
without support for the filesystem in question but later need to compile
the module. With the #ifdef there, you'd need to recompile (and reboot) the
whole thing.

Anything in the kernel image which is dependent on CONFIG_*_MODULE is, as a
general rule, broken. Sometimes there are justifications for it. Not often,
though.

--
dwmw2