Re: [PATCH 6/6] Makes procs file writable to move all threads by tgid at once

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 3, 2009 at 6:45 PM, Li Zefan<lizf@xxxxxxxxxxxxxx> wrote:
>
> No. Note task exiting is not protected by cgroup_lock, so this can
> happen:
>
>                               | cgroup_attach_task()
>                               |   oldcg = tsk->cgroups;
>                               |   (tasks->flags & TASK_EXISING == 0)
>                               |   rcu_assign_pointer(tsk->cgroups, newcg);
> cgroup_exit()                  |
>  oldcg = tsk->cgroups;        |
>  put_css_set_taskexit(oldcg); |
>  (now ref of olcg is 0)       |
>                               |   put_css_set(oldcg);
>

But in both cases, reading tsk->cgroups occurs with task->alloc_lock held.

Paul
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers


[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux