linux-2.1.90 PATCH: kmod hangs in initial ramdisk

Adam J. Richter (adam@yggdrasil.com)
Wed, 18 Mar 1998 11:53:16 -0800


In Linux 2.1.90, the "linuxrc" program in the initial
ramdisk is run before the kernel kmod thread has been created, so
it hangs as soon is it does anything that causes request_module()
to be called (for example, by loading the scsi disk module, which
now does a request_module("scsi_hostadatper")).

Here is the patch that move the start of kmod to before
the running of the initial ramdisk. It works for me. I am writing
this message from a machine running 2.1.90 that had its disk drivers
loaded by an initial ramdisk.

Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 205
adam@yggdrasil.com \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."
----------------------------CUT HERE----------------------------------
--- /tmp/linux-2.1.90/init/main.c Thu Mar 12 10:56:01 1998
+++ linux/init/main.c Wed Mar 18 11:37:41 1998
@@ -1159,6 +1159,13 @@
}
#endif

+#ifdef CONFIG_KMOD
+ {
+ extern int kmod_init(void);
+ kmod_init();
+ }
+#endif
+
#ifdef CONFIG_BLK_DEV_INITRD
root_mountflags = real_root_mountflags;
if (mount_initrd && ROOT_DEV != real_root_dev
@@ -1176,13 +1183,6 @@
printk(KERN_ERR "Change root to /initrd: "
"error %d\n",error);
}
- }
-#endif
-
-#ifdef CONFIG_KMOD
- {
- extern int kmod_init(void);
- kmod_init();
}
#endif

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu