Skip to content

Commit e7097e8

Browse files
Peter ZijlstraIngo Molnar
authored andcommitted
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 <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>
1 parent ff960a7 commit e7097e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/sched/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7301,7 +7301,7 @@ void __might_sleep(const char *file, int line, int preempt_offset)
73017301
* since we will exit with TASK_RUNNING make sure we enter with it,
73027302
* otherwise we will destroy state.
73037303
*/
7304-
if (WARN(current->state != TASK_RUNNING,
7304+
if (WARN_ONCE(current->state != TASK_RUNNING,
73057305
"do not call blocking ops when !TASK_RUNNING; "
73067306
"state=%lx set at [<%p>] %pS\n",
73077307
current->state,

0 commit comments

Comments
 (0)