[Devel] Re: [PATCH] cgroups: add lock for child->cgroups in cgroup_post_fork()
Paul Menage
menage at google.com
Fri Nov 21 09:59:05 PST 2008
On Fri, Nov 21, 2008 at 12:49 AM, Lai Jiangshan <laijs at cn.fujitsu.com> 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 at cn.fujitsu.com>
Reviewed-by: Paul Menage <menage at google.com>
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 at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list