diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-01-09 22:34:08 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2013-04-04 22:09:42 (GMT) |
commit | 3fdeda22a495d6d12870a39495fba3d478a6b90b (patch) | |
tree | d3a448d30556f8ee52b8139bd56001653c92783b /kernel | |
parent | 3686586e34d3addd28e6cfe02949e5f79ddf854f (diff) | |
download | linux-fsl-qoriq-3fdeda22a495d6d12870a39495fba3d478a6b90b.tar.xz |
sched: Check for idle task in might_sleep()
Idle is not allowed to call sleeping functions ever!
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched/core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 7429aef..06f41cf 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -7391,7 +7391,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) |