[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130204150930.GR17632@redhat.com>
Date: Mon, 4 Feb 2013 10:09:30 -0500
From: Aristeu Rozanski <aris@...hat.com>
To: "Serge E. Hallyn" <serge@...lyn.com>
Cc: linux-kernel@...r.kernel.org, cgroups@...r.kernel.org,
Tejun Heo <tj@...nel.org>,
Serge Hallyn <serge.hallyn@...onical.com>
Subject: Re: [PATCH v5 9/9] devcg: propagate local changes down the hierarchy
On Sat, Feb 02, 2013 at 04:20:52PM +0000, Serge E. Hallyn wrote:
> Quoting Aristeu Rozanski (aris@...hat.com):
> > +static int propagate_exception(struct dev_cgroup *devcg_root)
> > +{
> > + struct cgroup *root = devcg_root->css.cgroup;
> > + struct dev_cgroup *devcg, *parent, *tmp;
> > + int rc = 0;
> > + LIST_HEAD(pending);
> > +
> > + get_online_devcg(root, &pending);
> > +
> > + list_for_each_entry_safe(devcg, tmp, &pending, propagate_pending) {
> > + parent = cgroup_to_devcgroup(devcg->css.cgroup->parent);
> > +
> > + dev_exception_clean(&devcg->exceptions);
> > + if (devcg->behavior == parent->behavior) {
> > + rc = dev_exceptions_copy(&devcg->exceptions, &parent->exceptions);
>
> Let's say parent A and child B both have DEFAULT_DENY, with a set of let's
> say 5 whitelist exceptions. Now the parent adds two more whitelist
> exceptions. As you say, we don't propagate those.
>
> Now the parent removes one of it's whitelist exceptions.
> devcgroup_update_access() calls dev_exception_rm() followed by
> propagate_exception(), which comes here and copies the parent's
> whitelist - including the two new whitelist rules - to the
> child.
ugh, I see your point. This gonna be trickier to fix.
--
Aristeu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists