]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: avoid attaching a cgroup root to two different superblocks, take 2
authorZefan Li <lizefan@huawei.com>
Wed, 19 Apr 2017 02:15:59 +0000 (10:15 +0800)
committerTejun Heo <tj@kernel.org>
Fri, 28 Apr 2017 22:04:54 +0000 (18:04 -0400)
commit24911f8616873445d5d03b8505b06d80f6ad01c6
treeb10b3242df285c38a45e4b8039b2e860a9e20def
parent2e0f6e3384503fff347f7528f5a37b4ab61cf27c
cgroup: avoid attaching a cgroup root to two different superblocks, take 2

Commit ebe5ea64e0b5 ("cgroup: avoid attaching a cgroup root to two
different superblocks") is broken.  Now we try to fix the race by
delaying the initialization of cgroup root refcnt until a superblock
has been allocated.

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Reported-by: Andrei Vagin <avagin@virtuozzo.com>
Tested-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Zefan Li <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cgroup-internal.h
kernel/cgroup/cgroup-v1.c
kernel/cgroup/cgroup.c