Re: [PATCH v13 4/5] cgroup: allow a cgroup subsystem to reject a fork

2015-06-09 Thread Tejun Heo
Hello, On Tue, Jun 9, 2015 at 4:20 PM, Aleksa Sarai wrote: > CGROUP_CANFORK_{START,END,COUNT} aren't used to restrict the > iteration. They're used for restricting the size of the @ss_priv > array. If you want, I can use CANFORK_{START,END} to restrict the > iteration -- I just prefer using the f

Re: [PATCH v13 4/5] cgroup: allow a cgroup subsystem to reject a fork

2015-06-09 Thread Aleksa Sarai
>> @@ -4924,6 +4927,7 @@ static void __init cgroup_init_subsys(struct >> cgroup_subsys *ss, bool early) >> >> have_fork_callback |= (bool)ss->fork << ss->id; >> have_exit_callback |= (bool)ss->exit << ss->id; >> + have_canfork_callback |= (bool)ss->can_fork << ss->id; > > Hmmm

Re: [PATCH v13 4/5] cgroup: allow a cgroup subsystem to reject a fork

2015-06-08 Thread Tejun Heo
Hello, Aleksa. Looks pretty good to me in general. Some minor comments below. On Sat, Jun 06, 2015 at 10:02:17AM +1000, Aleksa Sarai wrote: > diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h > index a593e29..17d0046 100644 > --- a/include/linux/cgroup.h > +++ b/include/linux/cgroup.

[PATCH v13 4/5] cgroup: allow a cgroup subsystem to reject a fork

2015-06-05 Thread Aleksa Sarai
Add a new cgroup subsystem callback can_fork that conditionally states whether or not the fork is accepted or rejected by a cgroup policy. In addition, add a cancel_fork callback so that if an error occurs later in the forking process, any state modified by can_fork can be reverted. Allow for a pr