]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: don't destroy the default root
authorLi Zefan <lizefan@huawei.com>
Wed, 4 Jun 2014 08:48:15 +0000 (16:48 +0800)
committerTejun Heo <tj@kernel.org>
Thu, 5 Jun 2014 01:21:51 +0000 (21:21 -0400)
commitc4f0c454b2744dafaa6731dff1b17197f5f9812c
treed172ba488c50cedbfd4f1d0f676b7a6512605d84
parent960f3bfc6e02b99fd647ac105c15f87e6775cf8c
cgroup: don't destroy the default root

The default root is allocated and initialized at boot phase, so we
shouldn't destroy the default root when it's umounted, otherwise
it will lead to disaster.

Just try mount and then umount the default root, and the kernel will
crash immediately.

v2:
- No need to check for CSS_NO_REF in cgroup_get/put(). (Tejun)
- Better call cgroup_put() for the default root in kill_sb(). (Tejun)
- Add a comment.

Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup.c