[PATCH] conditionalize call from panic() to smp_send_stop()

From: Jan Beulich
Date: Wed Jan 14 2009 - 07:25:13 EST


... avoiding nested warnings and/or oopses as much as possible (namely
durin early boot).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

---
kernel/panic.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- linux-2.6.29-rc1/kernel/panic.c 2009-01-14 11:36:29.000000000 +0100
+++ 2.6.29-rc1-panic-conditional-stop/kernel/panic.c 2009-01-06 17:02:49.000000000 +0100
@@ -89,7 +89,8 @@ NORET_TYPE void panic(const char * fmt,
* unfortunately means it may not be hardened to work in a panic
* situation.
*/
- smp_send_stop();
+ if (num_online_cpus() > 1)
+ smp_send_stop();
#endif

atomic_notifier_call_chain(&panic_notifier_list, 0, buf);



--
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/