Takao Indoh d8ad7d1123 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->list.next.

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 <indou.takao@jp.fujitsu.com>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Milton Miller <miltonm@bga.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: kexec@lists.infradead.org
Link: http://lkml.kernel.org/r/D6CBEE2F420741indou.takao@jp.fujitsu.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-06-17 10:17:12 +02:00
..
2011-03-31 11:26:23 -03:00
2010-08-09 16:48:42 -04:00
2010-07-14 11:29:46 +02:00
2011-03-31 11:26:23 -03:00
2011-03-14 09:15:23 -04:00
2010-10-30 01:42:19 -04:00
2011-05-19 18:51:57 +10:00
2011-05-26 17:12:34 -07:00
2011-03-31 11:26:23 -03:00
2009-09-18 09:48:52 -07:00
2011-05-29 11:32:28 -07:00
2011-05-17 23:19:17 +02:00
2010-10-01 10:50:58 -07:00
2011-05-24 22:55:24 +10:00
2011-03-31 11:26:23 -03:00
2011-05-26 17:12:34 -07:00
2011-05-26 17:12:34 -07:00
2011-03-31 11:26:23 -03:00
2011-04-18 10:35:30 -07:00
2011-05-24 12:10:51 +02:00
2011-05-20 12:50:29 -07:00
2011-05-31 10:01:48 +02:00
2011-05-31 10:01:48 +02:00
2011-03-31 11:26:23 -03:00
2011-04-24 13:18:38 +02:00
2011-06-14 19:12:17 -07:00
2011-03-23 19:46:51 -07:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00