[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140214160225.GD31544@htj.dyndns.org>
Date: Fri, 14 Feb 2014 11:02:25 -0500
From: Tejun Heo <tj@...nel.org>
To: Li Zefan <lizf.kern@...il.com>
Cc: Li Zefan <lizefan@...wei.com>, LKML <linux-kernel@...r.kernel.org>,
Cgroups <cgroups@...r.kernel.org>
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists