diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 28da50a5bc769d4e73247406bd257a12d969ef25..4e9617a7e7d95718fb58aecc1175013a7aae8b2d 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -3168,6 +3168,9 @@ static noinline void __schedule_bug(struct task_struct *prev) pr_cont("\n"); } #endif + if (panic_on_warn) + panic("scheduling while atomic\n"); + dump_stack(); add_taint(TAINT_WARN, LOCKDEP_STILL_OK); }