]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] module_subsys: initialize earlier
authorMark Huang <mlhuang@CS.Princeton.EDU>
Fri, 29 Sep 2006 08:59:34 +0000 (01:59 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 29 Sep 2006 16:18:08 +0000 (09:18 -0700)
Initialize module_subsys earlier (or at least earlier than devices) since
it could be used very early in the boot process if kmod loads a module
before the device initcalls.  Otherwise, kmod will crash in
kernel/module.c:mod_sysfs_setup() since the kset in module_subsys is not
initialized yet.

I only noticed this problem because occasionally, kmod loads the modules
for my SCSI and Ethernet adapters very early, during the boot process
itself.  I don't quite understand why it loads them sometimes and doesn't
load them other times.  Or who is telling kmod to do so.  Can someone
explain?

Signed-off-by: Mark Huang <mlhuang@cs.princeton.edu>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/params.c

index 63d432d0ebc058d276cbebd3ac9fc708e9c9cdc9..f406655d66536b8a373b62c082b9ef64364d2c20 100644 (file)
@@ -699,7 +699,7 @@ static int __init param_sysfs_init(void)
 
        return 0;
 }
-__initcall(param_sysfs_init);
+subsys_initcall(param_sysfs_init);
 
 EXPORT_SYMBOL(param_set_byte);
 EXPORT_SYMBOL(param_get_byte);