Re: [PATCH] cgroup_clone: use pid of newly created task for newcgroup

From: Serge E. Hallyn
Date: Thu Jun 12 2008 - 16:37:42 EST


Quoting Serge E. Hallyn (serue@xxxxxxxxxx):
> cgroup_clone creates a new cgroup with the pid of the task. This works
> correctly for unshare, but for clone cgroup_clone is called from
> copy_namespaces inside copy_process, which happens before the new pid
> is created. As a result, the new cgroup was created with current's pid.
> This patch:

"I swear it worked yesterday..." but in any case this fix is needed on
top of the cgroup_clone patch

-serge