[Devel] Re: [RFC][PATCH] introduce task cgroup (#task restrictioon for prevent fork bomb by cgroup)
KOSAKI Motohiro
kosaki.motohiro at jp.fujitsu.com
Thu Jun 5 03:53:50 PDT 2008
> You are not handling task migration between groups, i.e.:
> # echo $$ > /cgroup/1/tasks
> # echo $$ > /cgroup/2/tasks
Oh, nice point out.
Thanks!
> Maybe you need to add this in cgroup_init_subsys():
>
> - need_forkexit_callback |= ss->fork || ss->exit;
> + need_forkexit_callback |= ss->fork || ss->exit || ss->can_fork;
>
> and then we can do:
>
> if (need_forkexit_callback) {
> for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
good idea :)
I'll fix it at next post.
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list