From 186a35eb3a416957f92c80e6e5e71849fbc39a5f Mon Sep 17 00:00:00 2001 From: Bo Yan Date: Wed, 26 Oct 2011 16:24:28 -0700 Subject: printk: fix the lockup when flushing console console_cpu_notify can be invoked when processing CPU_DYING. When this happens, the CPU running this code can switch into idle loop and kill itself when trying to acquire semaphore. Reviewed-on: http://git-master/r/60555 (cherry picked from commit 30a39da45fda058c9195605a9cbdabfc9e500bda) Change-Id: I3df89bcaf8c2e9bfe814cd6e64489cb30d73de6d Reviewed-on: http://git-master/r/62301 Reviewed-by: Bo Yan Reviewed-by: Raymond Poudrier Tested-by: Raymond Poudrier Reviewed-by: Ryan Wong --- kernel/printk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/printk.c b/kernel/printk.c index 8d41a50af0db..eab694b02833 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -1072,7 +1072,9 @@ static int __cpuinit console_cpu_notify(struct notifier_block *self, switch (action) { case CPU_ONLINE: case CPU_DEAD: +#ifndef CONFIG_ARCH_TEGRA case CPU_DYING: +#endif case CPU_DOWN_FAILED: case CPU_UP_CANCELED: acquire_console_sem(); -- cgit v1.2.3