lkml.org 
[lkml]   [2014]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cgroup: fix top cgroup refcnt leak
On Fri, Feb 14, 2014 at 07:15:18PM +0800, Li Zefan wrote:
> > /*
> > + * A root's lifetime is governed by its top cgroup. Zero
> > + * ref indicate that the root is being destroyed. Wait for
> > + * destruction to complete so that the subsystems are free.
> > + * We can use wait_queue for the wait but this path is
> > + * super cold. Let's just sleep for a bit and retry.
> > + */
> > + if (!atomic_read(&root->top_cgroup.refcnt)) {
>
> oops, this fix is wrong. We call kernfs_mount() without cgroup locks and it
> drops cgroup refcnt if failed.
>
> I guess we need to bump the refcnt and then drop it after kernfs_mount().

Alright, will wait for the updated fix.

Thanks!

--
tejun


\
 
 \ /
  Last update: 2014-02-14 17:41    [W:0.074 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site