lkml.org 
[lkml]   [2011]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/5] cgroup: remove redundant get/put of task struct
    Tejun Heo (tj@kernel.org) wrote:
    > Hello,
    >
    > On Tue, Dec 20, 2011 at 03:14:30PM -0800, Mandeep Singh Baines wrote:
    > > @@ -2287,14 +2280,12 @@ static int attach_task_by_pid(struct cgroup *cgrp, u64 pid, bool threadgroup)
    > > cgroup_unlock();
    > > return -EACCES;
    > > }
    > > - get_task_struct(tsk);
    > > rcu_read_unlock();
    >
    > This is before threadgroup is locked. What guarantees @tsk doesn't go
    > away once rcu is unlocked?
    >

    Nothing. D'oh. I'll remove the changes to attach_task_by_id and leave
    the others.

    > Thanks.
    >
    > --
    > tejun


    \
     
     \ /
      Last update: 2011-12-21 01:15    [W:0.019 / U:119.964 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site