]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "cgroup: remove redundant variable in cgroup_mount()"
authorZefan Li <lizefan@huawei.com>
Fri, 26 Sep 2014 04:03:25 +0000 (12:03 +0800)
committerTejun Heo <tj@kernel.org>
Fri, 26 Sep 2014 04:16:23 +0000 (00:16 -0400)
commit89a6f735c8e9250a78160c8029f14886e32cd71b
treed9deebb021eb70e509f0c44b4094bc18509ea036
parent117ecd66a71dfc758a9d731ebe2cb8670b971442
Revert "cgroup: remove redundant variable in cgroup_mount()"

This reverts commit 117ecd66a71dfc758a9d731ebe2cb8670b971442.

If there are child cgroups in the cgroupfs and then we umount it,
the superblock will be destroyed but the cgroup_root will be kept
around. When we mount it again, cgroup_mount() will find this
cgroup_root and allocate a new sb for it.

So with this commit we will be trapped in a dead loop in the case
described above, because kernfs_pin_sb() keeps returning NULL.

Currently I don't see how we can avoid using both pinned_sb and
new_sb, so just revert it.

Cc: Al Viro <viro@ZenIV.linux.org.uk>
Reported-by: Andrey Wagin <avagin@gmail.com>
Signed-off-by: Zefan Li <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup.c