From: Peter Zijlstra Date: Wed, 29 Oct 2014 16:08:45 +0000 (+0100) Subject: sched: Use WARN_ONCE for the might_sleep() TASK_RUNNING test X-Git-Tag: v3.19-rc1~158^2~22 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=e7097e8bd0074b465f9c78dcff25cd3f82382581;p=~emulex%2Finfiniband.git sched: Use WARN_ONCE for the might_sleep() TASK_RUNNING test In some cases this can trigger a true flood of output. Requested-by: Ingo Molnar Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched/core.c b/kernel/sched/core.c index b9f78f12ac2..0cd34e68680 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -7301,7 +7301,7 @@ void __might_sleep(const char *file, int line, int preempt_offset) * since we will exit with TASK_RUNNING make sure we enter with it, * otherwise we will destroy state. */ - if (WARN(current->state != TASK_RUNNING, + if (WARN_ONCE(current->state != TASK_RUNNING, "do not call blocking ops when !TASK_RUNNING; " "state=%lx set at [<%p>] %pS\n", current->state,