From: Aristeu Rozanski <aris@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>,
Li Zefan <lizefan@huawei.com>, James Morris <jmorris@namei.org>,
Pavel Emelyanov <xemul@openvz.org>,
Serge Hallyn <serge.hallyn@canonical.com>,
Jiri Slaby <jslaby@suse.cz>,
cgroups@vger.kernel.org
Subject: Re: [PATCH] device_cgroup: fix unchecked cgroup parent usage
Date: Thu, 1 Nov 2012 09:28:38 -0400 [thread overview]
Message-ID: <20121101132837.GE14789@redhat.com> (raw)
In-Reply-To: <20121031163501.79a0950e.akpm@linux-foundation.org>
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@redhat.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
prev parent reply other threads:[~2012-11-01 13:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-31 16:04 [PATCH] device_cgroup: fix unchecked cgroup parent usage Aristeu Rozanski
2012-10-31 16:23 ` Tejun Heo
2012-10-31 17:21 ` Serge Hallyn
2012-10-31 23:35 ` Andrew Morton
2012-11-01 13:28 ` Aristeu Rozanski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121101132837.GE14789@redhat.com \
--to=aris@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=jmorris@namei.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=serge.hallyn@canonical.com \
--cc=tj@kernel.org \
--cc=xemul@openvz.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox