Re: [PATCH] cgroups: add lock for child->cgroups in cgroup_post_fork()

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

 



On Fri, Nov 21, 2008 at 12:49 AM, Lai Jiangshan <laijs@xxxxxxxxxxxxxx> wrote:
> when cgroup_post_fork() called, child is seen by find_task_by_vpid(),
> so child->cgroups maybe be changed, It'll incorrect.
>
> child->cgroups<old>'s refcnt is decreased
> child->cgroups<new>'s refcnt is increased
> but child->cg_list is added to child->cgroups<old>'s list.
>
> Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxx>

Reviewed-by: Paul Menage <menage@xxxxxxxxxx>

Yeah, I guess this was a place where I equated "holding css_set_lock"
with "cgroups can't change". But in fact they can partially change.

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