Re: [PATCH] cgroup: avoid attaching a cgroup root to two different superblocks, take 2

2017-04-28 Thread Tejun Heo
On Wed, Apr 19, 2017 at 10:15:59AM +0800, Zefan Li wrote: > Commit bfb0b80db5f9 is broken. Now we try to fix the race by delaying > the initialization of cgroup root refcnt until a superblock has been > allocated. > > Cc: sta...@vger.kernel.org # 3.16+ > Reported-by: Dmitry Vyukov > Reported-by: A

[PATCH] cgroup: avoid attaching a cgroup root to two different superblocks, take 2

2017-04-18 Thread Zefan Li
Commit bfb0b80db5f9 is broken. Now we try to fix the race by delaying the initialization of cgroup root refcnt until a superblock has been allocated. Cc: sta...@vger.kernel.org # 3.16+ Reported-by: Dmitry Vyukov Reported-by: Andrei Vagin Tested-by: Andrei Vagin Signed-off-by: Zefan Li --- I a

Re: [PATCH] cgroup: avoid attaching a cgroup root to two different superblocks

2017-04-10 Thread Tejun Heo
On Fri, Apr 07, 2017 at 04:51:55PM +0800, Zefan Li wrote: > We end up using the same cgroup root for two different superblocks, > so percpu_ref_kill() will be called twice on the same root when the > two superblocks are destroyed. > > We should fix to make sure the superblock pinning is really suc

[PATCH] cgroup: avoid attaching a cgroup root to two different superblocks

2017-04-07 Thread Zefan Li
Run this: touch file0 for ((; ;)) { mount -t cpuset xxx file0 } And this concurrently: touch file1 for ((; ;)) { mount -t cpuset xxx file1 } We'll trigger a warning like this: [ cut here ] WARNING: CPU: 1 PID: 4675 at li