提交 d10be6d1 编写于 作者: M Mark Huang 提交者: Linus Torvalds

[PATCH] module_subsys: initialize earlier

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: NMark Huang <mlhuang@cs.princeton.edu>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 8454aeef
...@@ -699,7 +699,7 @@ static int __init param_sysfs_init(void) ...@@ -699,7 +699,7 @@ static int __init param_sysfs_init(void)
return 0; return 0;
} }
__initcall(param_sysfs_init); subsys_initcall(param_sysfs_init);
EXPORT_SYMBOL(param_set_byte); EXPORT_SYMBOL(param_set_byte);
EXPORT_SYMBOL(param_get_byte); EXPORT_SYMBOL(param_get_byte);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册