lkml.org 
[lkml]   [2019]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/1] sched: panic, when call schedule with preemption disable
Date
When preemption is disable, call schedule() is incorrect behavior.
Suggest to panic directly rather than depend on panic_on_warn.

Signed-off-by: YT Chang <yt.chang@mediatek.com>
---
kernel/sched/core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 7880f4f..214e8d8 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3861,9 +3861,8 @@ static noinline void __schedule_bug(struct task_struct *prev)
print_ip_sym(preempt_disable_ip);
pr_cont("\n");
}
- if (panic_on_warn)
- panic("scheduling while atomic\n");

+ panic("scheduling while atomic\n");
dump_stack();
add_taint(TAINT_WARN, LOCKDEP_STILL_OK);
}
--
1.9.1
\
 
 \ /
  Last update: 2019-11-21 09:13    [W:0.445 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site