Skip to content

Commit

Permalink
sched: Use WARN_ONCE for the might_sleep() TASK_RUNNING test
Browse files Browse the repository at this point in the history
In some cases this can trigger a true flood of output.

Requested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Nov 4, 2014
1 parent ff960a7 commit e7097e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e7097e8

Please sign in to comment.