cgroup: avoid attaching a cgroup root to two different superblocks, take 2
authorZefan Li <[email protected]>
Wed, 19 Apr 2017 02:15:59 +0000 (10:15 +0800)
committerTejun Heo <[email protected]>
Fri, 28 Apr 2017 22:04:54 +0000 (18:04 -0400)
commit9732adc5d6520238223df16630f1f8cad2269317
treeb10b3242df285c38a45e4b8039b2e860a9e20def
parenta590b90d472f2c176c140576ee3ab44df7f67839
cgroup: avoid attaching a cgroup root to two different superblocks, take 2

Commit bfb0b80db5f9 ("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 <[email protected]>
Reported-by: Andrei Vagin <[email protected]>
Tested-by: Andrei Vagin <[email protected]>
Signed-off-by: Zefan Li <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
kernel/cgroup/cgroup-internal.h
kernel/cgroup/cgroup-v1.c
kernel/cgroup/cgroup.c