projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7717785
)
sched: Check for idle task in might_sleep()
author
Thomas Gleixner
<tglx@linutronix.de>
Fri, 7 Feb 2014 19:58:38 +0000
(20:58 +0100)
committer
Ingo Molnar
<mingo@kernel.org>
Sat, 22 Feb 2014 17:07:50 +0000
(18:07 +0100)
Idle is not allowed to call sleeping functions ever!
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link:
http://lkml.kernel.org/r/1391803122-4425-3-git-send-email-bigeasy@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/core.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/sched/core.c
b/kernel/sched/core.c
index 06da865043ecbebe4c0280349dd18924a40e0d5c..a01fe6cfdb9b6935e4495512a843714d7ebe9498 100644
(file)
--- a/
kernel/sched/core.c
+++ b/
kernel/sched/core.c
@@
-6927,7
+6927,8
@@
void __might_sleep(const char *file, int line, int preempt_offset)
static unsigned long prev_jiffy; /* ratelimiting */
rcu_sleep_check(); /* WARN_ON_ONCE() by default, no rate limit reqd. */
- if ((preempt_count_equals(preempt_offset) && !irqs_disabled()) ||
+ if ((preempt_count_equals(preempt_offset) && !irqs_disabled() &&
+ !is_idle_task(current)) ||
system_state != SYSTEM_RUNNING || oops_in_progress)
return;
if (time_before(jiffies, prev_jiffy + HZ) && prev_jiffy)