[PATCH] wait_task_inactive should not return on preempt
wait_task_inactive is now only used in two non-time-critical places: the ptrace code to guarantee a schedule and kthread_bind so we can change the thread CPU. Unfortunately with preempt, the code as stands has a race: we might return because the thread is preempted, not because it actually reached schedule(). The ptrace code (probably) doesn't care, but the kthread code does. This patch simplifies the (now over-optimized) code, and does a yield() for the preemption case.
Showing
Please register or sign in to comment