···5858 /* Hmm, should we be allowed to suspend when there are realtime5959 processes around? */6060 bool was_frozen = false;6161- long save = current->state;6161+ unsigned int save = get_current_state();62626363 pr_debug("%s entered refrigerator\n", current->comm);6464
+3-3
kernel/sched/core.c
···9098909890999099void __might_sleep(const char *file, int line, int preempt_offset)91009100{91019101+ unsigned int state = get_current_state();91019102 /*91029103 * Blocking primitives will set (and therefore destroy) current->state,91039104 * since we will exit with TASK_RUNNING make sure we enter with it,91049105 * otherwise we will destroy state.91059106 */91069106- WARN_ONCE(current->state != TASK_RUNNING && current->task_state_change,91079107+ WARN_ONCE(state != TASK_RUNNING && current->task_state_change,91079108 "do not call blocking ops when !TASK_RUNNING; "91089108- "state=%lx set at [<%p>] %pS\n",91099109- current->state,91099109+ "state=%x set at [<%p>] %pS\n", state,91109110 (void *)current->task_state_change,91119111 (void *)current->task_state_change);91129112