Initialize module_subsys earlier (or at least earlier than devices)
authorMark Huang <mlhuang@cs.princeton.edu>
Thu, 27 Jul 2006 22:04:27 +0000 (22:04 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Thu, 27 Jul 2006 22:04:27 +0000 (22:04 +0000)
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.

kernel/params.c

index af43ecd..c67011b 100644 (file)
@@ -691,7 +691,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);