From 9e897183d50b3cc0d85aaee2cf526e12c88be95e Mon Sep 17 00:00:00 2001 From: Sameer Nanda Date: Tue, 8 May 2012 23:07:31 +0000 Subject: [PATCH] CHROMIUM: scheduler: panic if schedulin while atomic When the schduling while atomic condition is hit, currently only a printk and dump_stack happens but the kernel continues to run. We've run into issues where we think this causes a hang during shutdown eventually. Now doing a kernel panic instead by calling BUG(). This should prevent hangs at shutdown from happening as well as providing us stack traces that might help us root cause the real issue. Signed-off-by: Sameer Nanda BUG=chromium-os:29599 TEST=We don't have a good way of repro'ing the hang on shutdown so the testing is limited to kernel building fine. Change-Id: I52084abf64a133a00f20e2eeaeb921820755e252 Reviewed-on: https://gerrit.chromium.org/gerrit/21534 Reviewed-by: Olof Johansson Commit-Ready: Sameer Nanda Tested-by: Sameer Nanda --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index e5212ae294f6..37d4146d3469 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -3112,7 +3112,7 @@ static noinline void __schedule_bug(struct task_struct *prev) print_modules(); if (irqs_disabled()) print_irqtrace_events(prev); - dump_stack(); + BUG(); } /* -- 2.20.1