On Wed, 26 Jul 2000, David Ford wrote:
> I got this on bootup, kernel test5-pre5.
how do you know it is from hub.c? Well, if it is from hub.c then it is
clear what's going on. If you look at init/main.c you will find that
usb_init() is called before do_initcalls() which is responsible for
processing module_init() functions (the ones in .initcall.init section).
And recently a new cache was added called names_cachep which is created by
fs/namei.c:namecache_init() which happens to be module_init().
So, if you request an object from the cache which is not created yet then
you obviously oops. I cc'd the other person who seems to have the same
problem. So, what happens if you apply this patch? Does the problem go
away?
Let me know.
regards,
Tigran
PS. The only problem with this explanation is that I don't see explicit
request_module() from within drivers/usb/*.c but perhaps they are hidden
behind some macros or inlines in the headers... Try the patch anyway.
diff -urN -X dontdiff linux/init/main.c work/init/main.c
--- linux/init/main.c Thu Jul 27 07:31:21 2000
+++ work/init/main.c Thu Jul 27 16:12:09 2000
@@ -632,6 +632,7 @@
*/
static void __init do_basic_setup(void)
{
+ extern int namecache_init();
#ifdef CONFIG_BLK_DEV_INITRD
int real_root_mountflags;
#endif
@@ -690,6 +691,7 @@
#ifdef CONFIG_ISAPNP
isapnp_init();
#endif
+ namecache_init();
#ifdef CONFIG_USB
usb_init(); /* Do this before doing initcalls, so that we can make
usbcore initialize here, and all drivers initialize later */
diff -urN -X dontdiff linux/fs/namei.c work/fs/namei.c
--- linux/fs/namei.c Thu Jul 27 07:31:19 2000
+++ work/fs/namei.c Thu Jul 27 16:12:11 2000
@@ -129,6 +129,10 @@
{
char *tmp, *result;
+ if (!names_cachep) {
+ printk(KERN_ERR "Fix the link order!\n");
+ BUG();
+ }
result = ERR_PTR(-ENOMEM);
tmp = __getname();
if (tmp) {
@@ -1958,7 +1962,7 @@
/* SLAB cache for name blocks */
kmem_cache_t *names_cachep;
-static int __init namecache_init(void)
+int __init namecache_init(void)
{
names_cachep = kmem_cache_create("names_cache",
PAGE_SIZE,
@@ -1970,4 +1974,4 @@
return 0;
}
-module_init(namecache_init)
+/* module_init(namecache_init) */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:26 EST