[lkml]   [2011]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [path][rfc] add PR_DETACH prctl command
    On 04/08, Stas Sergeev wrote:
    > I updated patch to fix the race between wait_task_detached()
    > and wait_task_zombie() by using is_detaching flag.
    > Here's the patch.
    > What problems do remain here?

    Stas, sorry, I simply have no time to read this patch. Not to mention,
    you know that I dislike it in any case.

    I only quickly looked at the changes in sys_prctl and they are definitely

    > + me->real_parent = pid_ns->child_reaper;
    > + if (thread_group_leader(me)) {
    > + list_move_tail(&me->sibling,
    > + &me->real_parent->children);
    > + /* reparent threads */
    > + p = me;
    > + while_each_thread(me, p) {
    > + if (!task_ptrace(p))
    > + p->parent = pid_ns->child_reaper;
    > + p->real_parent = pid_ns->child_reaper;

    Why do you check thread_group_leader() ???? What if the caller is not
    the leader?

    I told this many times, and I got lost. If you reparent, you should
    always reparent the whole group.

    Also, you are doing do_signal_parent(me). I do not know what it does
    (once again, I didn't read the patch), but this looks suspicious.
    A sub-thread shouldn't notify the parent.


     \ /
      Last update: 2011-04-08 20:59    [W:0.406 / U:47.300 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site