[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20121101132837.GE14789@redhat.com>
Date: Thu, 1 Nov 2012 09:28:38 -0400
From: Aristeu Rozanski <aris@...hat.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, Tejun Heo <tj@...nel.org>,
Li Zefan <lizefan@...wei.com>,
James Morris <jmorris@...ei.org>,
Pavel Emelyanov <xemul@...nvz.org>,
Serge Hallyn <serge.hallyn@...onical.com>,
Jiri Slaby <jslaby@...e.cz>, cgroups@...r.kernel.org
Subject: Re: [PATCH] device_cgroup: fix unchecked cgroup parent usage
On Wed, Oct 31, 2012 at 04:35:01PM -0700, Andrew Morton wrote:
> On Wed, 31 Oct 2012 12:04:30 -0400
> Aristeu Rozanski <aris@...hat.com> wrote:
>
> > In 4cef7299b4786879a3e113e84084a72b24590c5b the cgroup parent usage is
> > unchecked. root will not have a parent and trying to use
> > device.{allow,deny} will cause problems.
>
> From my reading of the code "problems" means "kernel null pointer
> dereference".
yes. you want me to resubmit it fixing it or you want to update it?
> > static inline int may_allow_all(struct dev_cgroup *parent)
>
> offtopic: this function could quite neatly have a bool return type.
ok, will do.
> > {
> > + if (!parent)
> > + return 1;
>
> hm. Does it need a comment explaining what and why? I guess not... just.
it's because the root's parent has to always allows full access to all
devices. I can add a comment when I turn into a bool if you want.
--
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