Re: [PATCH]Skip unnecessary WARN_ON in panic case

From: Ingo Molnar
Date: Mon Mar 11 2013 - 04:28:59 EST



* Seiji Aguchi <seiji.aguchi@xxxxxxx> wrote:

> [Problem]
>
> When kernel panics, unnecessary WARN_ON() may be printed after panic messages in a following scenario.
> - A panicked cpu stops other cpus via smp_send_stop().
> - Other cpus turn to be offline in stop_this_cpu().
> - The panicked cpu enables interrupt.
> - native_smp_send_reschedule() is called via a timer interrupt on the panicked cpu.
> - The panicked cpu tries to send a reschedule IPI to other cpus
> - The panicked cpu hits WARN_ON() because other cpus have already been offlined.
>
> If an user has just a VGA console, panic messages may be missed because
> they are floated outside a screen due to messages of the WARN_ON(). In
> this case, it could be difficult to investigate the reason why a kernel
> panicked.

So it appears the problem occurs because the other CPUs are not offlined
correctly, and still have pending work which may generate wakeup IPIs to
them?

The fix would be to either offline them properly - or, if we don't want to
do that to keep panicking simple, why do we mark them offline? They aren't
really offline in a proper way.

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/