diff options
-rw-r--r-- | include/linux/init.h | 1 | ||||
-rw-r--r-- | init/main.c | 6 | ||||
-rw-r--r-- | kernel/module.c | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/init.h b/include/linux/init.h index 11b84e106053..93538b696e3d 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -139,6 +139,7 @@ extern initcall_t __con_initcall_start[], __con_initcall_end[]; | |||
139 | extern initcall_t __security_initcall_start[], __security_initcall_end[]; | 139 | extern initcall_t __security_initcall_start[], __security_initcall_end[]; |
140 | 140 | ||
141 | /* Defined in init/main.c */ | 141 | /* Defined in init/main.c */ |
142 | extern int do_one_initcall(initcall_t fn); | ||
142 | extern char __initdata boot_command_line[]; | 143 | extern char __initdata boot_command_line[]; |
143 | extern char *saved_command_line; | 144 | extern char *saved_command_line; |
144 | extern unsigned int reset_devices; | 145 | extern unsigned int reset_devices; |
diff --git a/init/main.c b/init/main.c index 0bc7e167bf45..f6f7042331dc 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -691,7 +691,7 @@ asmlinkage void __init start_kernel(void) | |||
691 | rest_init(); | 691 | rest_init(); |
692 | } | 692 | } |
693 | 693 | ||
694 | static int __initdata initcall_debug; | 694 | static int initcall_debug; |
695 | 695 | ||
696 | static int __init initcall_debug_setup(char *str) | 696 | static int __init initcall_debug_setup(char *str) |
697 | { | 697 | { |
@@ -700,7 +700,7 @@ static int __init initcall_debug_setup(char *str) | |||
700 | } | 700 | } |
701 | __setup("initcall_debug", initcall_debug_setup); | 701 | __setup("initcall_debug", initcall_debug_setup); |
702 | 702 | ||
703 | static void __init do_one_initcall(initcall_t fn) | 703 | int do_one_initcall(initcall_t fn) |
704 | { | 704 | { |
705 | int count = preempt_count(); | 705 | int count = preempt_count(); |
706 | ktime_t t0, t1, delta; | 706 | ktime_t t0, t1, delta; |
@@ -740,6 +740,8 @@ static void __init do_one_initcall(initcall_t fn) | |||
740 | print_fn_descriptor_symbol(KERN_WARNING "initcall %s", fn); | 740 | print_fn_descriptor_symbol(KERN_WARNING "initcall %s", fn); |
741 | printk(" returned with %s\n", msgbuf); | 741 | printk(" returned with %s\n", msgbuf); |
742 | } | 742 | } |
743 | |||
744 | return result; | ||
743 | } | 745 | } |
744 | 746 | ||
745 | 747 | ||
diff --git a/kernel/module.c b/kernel/module.c index 61d212120df4..08864d257eb0 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -2288,7 +2288,7 @@ sys_init_module(void __user *umod, | |||
2288 | 2288 | ||
2289 | /* Start the module */ | 2289 | /* Start the module */ |
2290 | if (mod->init != NULL) | 2290 | if (mod->init != NULL) |
2291 | ret = mod->init(); | 2291 | ret = do_one_initcall(mod->init); |
2292 | if (ret < 0) { | 2292 | if (ret < 0) { |
2293 | /* Init routine failed: abort. Try to protect us from | 2293 | /* Init routine failed: abort. Try to protect us from |
2294 | buggy refcounters. */ | 2294 | buggy refcounters. */ |