[lkml]   [2008]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subjectrfc, leader_pid_type()
    Eric, Pavel.

    Without tasklist lock held, task_tgid/task_pgrp/task_session can return the
    bogus NULL. Note that the last 2 can return NULL even if task == current.

    What do you think if we add yet another helper?

    struct pid *leader_pid_type(struct task_struct *task, enum pid_type type)
    struct pid *ret;
    ret = task->group_leader->pids[type].pid;
    if (likely(ret != NULL) || !pid_alive(task))
    return ret;
    * We hit the old leader in the middle of de_thread(),
    * or setsid/setpgrp is in progress.
    goto retry;

    Yes, we already have a lot helpers... The one potential user is
    check_kill_permission(), but it can live without it.

    What do you think, do you see other possible users? Say, do_task_stat() may
    report sid = 0, but this is minor of course...


     \ /
      Last update: 2008-03-20 00:03    [W:0.021 / U:0.284 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site