Re: [ 032/173] cgroup: cgroup_subsys->fork() should be called afterthe task is added to css_set

From: Ben Hutchings
Date: Tue Jan 01 2013 - 09:21:25 EST


On Tue, 2013-01-01 at 22:31 +0900, Satoru Takeuchi wrote:
> Hi Ben,
>
> At Fri, 28 Dec 2012 20:04:02 +0100,
> Ben Hutchings wrote:
> >
> > 3.2-stable review patch. If anyone has any objections, please let me know.
> >
> > ------------------
> >
> > From: Tejun Heo <tj@xxxxxxxxxx>
> >
> > commit 5edee61edeaaebafe584f8fb7074c1ef4658596b upstream.
[...]
> I failed to compile 3.2.36-rc1 with my x86_64 box with enabling cgroup.
>
> build log:
> ===============================================================================
> ...
> CC kernel/cgroup.o
> kernel/cgroup.c: In function âcgroup_post_forkâ:
> kernel/cgroup.c:4540:5: warning: passing argument 1 of âss->forkâ from incompatible pointer type [enabled by default]
> kernel/cgroup.c:4540:5: note: expected âstruct cgroup_subsys *â but argument is of type âstruct task_struct *â
> kernel/cgroup.c:4540:5: error: too few arguments to function âss->forkâ
> make[2]: *** [kernel/cgroup.o] Error 1
> make[1]: *** [kernel] Error 2
> make[1]: Leaving directory `/home/sat/src/linux-stable'
> make: *** [debian/stamp/build/kernel] Error 2
> ===============================================================================
>
> It comes from the ss->fork()'s API change introduced by commit 761b3ef50e1c2.
[...]
> I found you mentioned this difference in the desctiption as follows.
>
> > - cgroup_subsys::fork takes cgroup_subsys pointer as first parameter]
>
> I guess you attached the wrong patch, or you forgot to modify the
> original patch. Here is the correct patch for the latter case. It just
> change "ss->fork(child)" to "ss->fork(ss, child)" as your description.
[...]

The correct version is in the combined patch, but I somehow missed
refreshing this individual patch. Thanks for pointing this out.

Ben.

--
Ben Hutchings
It is easier to change the specification to fit the program than vice versa.

Attachment: signature.asc
Description: This is a digitally signed message part