Commit 4597f0c0 authored by Ingo Molnar's avatar Ingo Molnar

do not unlock irqs before calling schedule() - besides being a small exit() speedup, this also

fixes a preemption race that was introduced by my removal of PREEMPT_ACTIVE.
parent 9bf40b14
...@@ -476,7 +476,12 @@ static void exit_notify(void) ...@@ -476,7 +476,12 @@ static void exit_notify(void)
write_lock_irq(&tasklist_lock); write_lock_irq(&tasklist_lock);
} }
} }
write_unlock_irq(&tasklist_lock); /*
* No need to unlock IRQs, we'll schedule() immediately
* anyway. In the preemption case this also makes it
* impossible for the task to get runnable again.
*/
write_unlock(&tasklist_lock);
} }
NORET_TYPE void do_exit(long code) NORET_TYPE void do_exit(long code)
......
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