Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932160AbbFIHVH (ORCPT ); Tue, 9 Jun 2015 03:21:07 -0400 Received: from mail-ig0-f171.google.com ([209.85.213.171]:34038 "EHLO mail-ig0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753588AbbFIHU7 (ORCPT ); Tue, 9 Jun 2015 03:20:59 -0400 MIME-Version: 1.0 X-Originating-IP: [122.106.150.15] In-Reply-To: <20150609044133.GQ21465@mtj.duckdns.org> References: <1433547736-11707-1-git-send-email-cyphar@cyphar.com> <1433548938-32560-4-git-send-email-cyphar@cyphar.com> <20150609044133.GQ21465@mtj.duckdns.org> Date: Tue, 9 Jun 2015 17:20:58 +1000 Message-ID: Subject: Re: [PATCH v13 4/5] cgroup: allow a cgroup subsystem to reject a fork From: Aleksa Sarai To: Tejun Heo Cc: lizefan@huawei.com, mingo@redhat.com, Peter Zijlstra , richard@nod.at, =?UTF-8?B?RnLDqWTDqXJpYyBXZWlzYmVja2Vy?= , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 958 Lines: 23 >> @@ -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/