device_cgroup: fix unchecked cgroup parent usage
authorAristeu Rozanski <aris@redhat.com>
Tue, 6 Nov 2012 15:25:04 +0000 (07:25 -0800)
committerTejun Heo <tj@kernel.org>
Tue, 6 Nov 2012 15:25:20 +0000 (07:25 -0800)
commit64e104771351d365e51e588a0e9a656ae6ed2f50
treee5078e0ba32729735846aa465c1f53f5d98c11ac
parent3d70f8c617a436c7146ecb81df2265b4626dfe89
device_cgroup: fix unchecked cgroup parent usage

In 4cef7299b478687 ("device_cgroup: add proper checking when changing
default behavior") the cgroup parent usage is unchecked.  root will not
have a parent and trying to use device.{allow,deny} will cause problems.
For some reason my stressing scripts didn't test the root directory so I
didn't catch it on my regular tests.

Signed-off-by: Aristeu Rozanski <aris@redhat.com>
Cc: Li Zefan <lizefan@huawei.com>
Cc: James Morris <jmorris@namei.org>
Cc: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
security/device_cgroup.c