path: root/init
diff options
authorTakao Indoh <>2011-03-29 12:35:04 -0400
committerIngo Molnar <>2011-06-17 10:17:12 +0200
commitd8ad7d1123a960cc9f276bd499f9325c6f5e1bd1 (patch)
tree0260df1b5b5b1601f56229c7dde54594d2dfebcb /init
parenteb96c925152fc289311e5d7e956b919e9b60ab53 (diff)
generic-ipi: Fix kexec boot crash by initializing call_single_queue before enabling interrupts
There is a problem that kdump(2nd kernel) sometimes hangs up due to a pending IPI from 1st kernel. Kernel panic occurs because IPI comes before call_single_queue is initialized. To fix the crash, rename init_call_single_data() to call_function_init() and call it in start_kernel() so that call_single_queue can be initialized before enabling interrupts. The details of the crash are: (1) 2nd kernel boots up (2) A pending IPI from 1st kernel comes when irqs are first enabled in start_kernel(). (3) Kernel tries to handle the interrupt, but call_single_queue is not initialized yet at this point. As a result, in the generic_smp_call_function_single_interrupt(), NULL pointer dereference occurs when list_replace_init() tries to access &q-> Therefore this patch changes the name of init_call_single_data() to call_function_init() and calls it before local_irq_enable() in start_kernel(). Signed-off-by: Takao Indoh <> Reviewed-by: WANG Cong <> Acked-by: Neil Horman <> Acked-by: Vivek Goyal <> Acked-by: Peter Zijlstra <> Cc: Milton Miller <> Cc: Jens Axboe <> Cc: Paul E. McKenney <> Cc: Link: Signed-off-by: Ingo Molnar <>
Diffstat (limited to 'init')
1 files changed, 1 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c
index cafba67c13bf..d7211faed2ad 100644
--- a/init/main.c
+++ b/init/main.c
@@ -542,6 +542,7 @@ asmlinkage void __init start_kernel(void)
+ call_function_init();
if (!irqs_disabled())
printk(KERN_CRIT "start_kernel(): bug: interrupts were "
"enabled early\n");