[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-a2885f6bf67671c83f9162a271bc8898d5062842@git.kernel.org>
Date: Fri, 21 Feb 2014 13:31:39 -0800
From: tip-bot for Thomas Gleixner <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, mingo@...hat.com, hpa@...or.com,
mingo@...nel.org, peterz@...radead.org, bigeasy@...utronix.de,
tglx@...utronix.de
Subject: [tip:sched/core] sched: Check for idle task in might_sleep()
Commit-ID: a2885f6bf67671c83f9162a271bc8898d5062842
Gitweb: http://git.kernel.org/tip/a2885f6bf67671c83f9162a271bc8898d5062842
Author: Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Fri, 7 Feb 2014 20:58:38 +0100
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Fri, 21 Feb 2014 21:43:18 +0100
sched: Check for idle task in might_sleep()
Idle is not allowed to call sleeping functions ever!
Cc: Ingo Molnar <mingo@...hat.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Signed-off-by: Peter Zijlstra <peterz@...radead.org>
Link: http://lkml.kernel.org/r/1391803122-4425-3-git-send-email-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
kernel/sched/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 86e0558..37d35e8 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6935,7 +6935,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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists