static struct kthread *to_live_kthread(struct task_struct *k)
{
struct completion *vfork = ACCESS_ONCE(k->vfork_done);
- if (likely(vfork) && try_get_task_stack(k))
+ if (likely(vfork))
return __to_kthread(vfork);
return NULL;
}
{
struct kthread *kthread = to_live_kthread(k);
- if (kthread) {
+ if (kthread)
__kthread_unpark(k, kthread);
- put_task_stack(k);
- }
}
EXPORT_SYMBOL_GPL(kthread_unpark);
wait_for_completion(&kthread->parked);
}
}
- put_task_stack(k);
ret = 0;
}
return ret;
__kthread_unpark(k, kthread);
wake_up_process(k);
wait_for_completion(&kthread->exited);
- put_task_stack(k);
}
ret = k->exit_code;
put_task_struct(k);