Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1161086

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

From Aleksa Sarai <cyphar@cyphar.com>
Newsgroups linux.kernel
Subject Re: [PATCH v13 4/5] cgroup: allow a cgroup subsystem to reject a fork
Date 2015-06-09 09:30 +0200
Message-ID <pzm8V-83c-7@gated-at.bofh.it> (permalink)
References <py9x7-7AM-3@gated-at.bofh.it> <py9Qu-8cW-15@gated-at.bofh.it> <pzjE5-4hu-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


>> @@ -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.... do we still need this mask?  We're already restricting
> iteration pretty heavily.

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 for_each_subsys_which API for
iterating over active cgroups. :/

--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v13 4/5] cgroup: allow a cgroup subsystem to reject a fork Tejun Heo <tj@kernel.org> - 2015-06-09 06:50 +0200
  Re: [PATCH v13 4/5] cgroup: allow a cgroup subsystem to reject a fork Aleksa Sarai <cyphar@cyphar.com> - 2015-06-09 09:30 +0200
    Re: [PATCH v13 4/5] cgroup: allow a cgroup subsystem to reject a fork Tejun Heo <tj@kernel.org> - 2015-06-09 09:30 +0200

csiph-web