Commit adc4bc97 authored by Linus Torvalds's avatar Linus Torvalds

Well, duh!

Initialize preempt count outside the spinlocks that can
themselves impact it on SMP.
parent a925c40f
......@@ -1438,10 +1438,12 @@ void __init init_idle(task_t *idle, int cpu)
idle->prio = MAX_PRIO;
idle->state = TASK_RUNNING;
idle->thread_info->cpu = cpu;
idle->thread_info->preempt_count = (idle->lock_depth >= 0);
double_rq_unlock(idle_rq, rq);
set_tsk_need_resched(idle);
__restore_flags(flags);
/* Set the preempt count _outside_ the spinlocks! */
idle->thread_info->preempt_count = (idle->lock_depth >= 0);
}
extern void init_timervecs(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment