Fix possible runqueue lock starvation in wait_task_inactive()