Commit faaadc0c authored by Linus Torvalds's avatar Linus Torvalds

Don't allow preemption to change task state.

parent 5e4b5079
...@@ -843,7 +843,8 @@ asmlinkage void preempt_schedule(void) ...@@ -843,7 +843,8 @@ asmlinkage void preempt_schedule(void)
{ {
if (unlikely(preempt_get_count())) if (unlikely(preempt_get_count()))
return; return;
current->state = TASK_RUNNING; if (current->state != TASK_RUNNING)
return;
schedule(); schedule();
} }
#endif /* CONFIG_PREEMPT */ #endif /* CONFIG_PREEMPT */
......
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