[lkml]   [2011]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 3/4] threadgroup: extend threadgroup_lock() to cover exit and exec
    On 09/18, Oleg Nesterov wrote:
    > Of course I am in no position to ack the changes in this code, I do not
    > fell I understand it enough. But afaics this series is fine.
    I do not feel ;)

    > If I am right, afaics the only change 4/4 needs is that it should not add
    > WARN_ON_ONCE(tsk->flags & PF_EXITING) into cgroup_task_migrate().

    Hmm. Unless I missed something this WARN_ON_ONCE() is not right anyway,

    > - * Call holding cgroup_mutex. May take task_lock of
    > - * the task 'tsk' during call.
    > + * Call with cgroup_mutex and threadgroup locked. May take task_lock of
    > + * @tsk during call.
    > */
    > int cgroup_attach_task(struct cgroup *cgrp, struct task_struct *tsk)

    this is not true, cgroup_attach_proc() has other callers.

    cgroup_attach_task_all() is probably fine, tsk should be current.

    but cpuset_do_move_task() doesn't look fine at first glance, we can race
    with the exiting task.

    And this leads to another question about the cgroup_mutex/threadgroup_lock


     \ /
      Last update: 2011-09-18 20:53    [W:0.020 / U:0.516 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site