From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergey Senozhatsky Subject: Re: [PATCH 6/8] cgroup: mount cgroupns-root when inside non-init cgroupns Date: Fri, 1 Jan 2016 10:17:03 +0900 Message-ID: <20160101011703.GA532@swordfish> References: <1450844609-9194-1-git-send-email-serge.hallyn@ubuntu.com> <1450844609-9194-7-git-send-email-serge.hallyn@ubuntu.com> <20151231133822.GA463@swordfish> <20160101005843.GA26243@mail.hallyn.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20160101005843.GA26243-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: "Serge E. Hallyn" Cc: Stephen Rothwell , gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Sergey Senozhatsky , linux-next-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org, lxc-devel-cunTk1MwBs9qMoObBWhMNEqPaTDuhLve2LY78lusg7I@public.gmane.org, hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org, tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org List-Id: linux-api@vger.kernel.org On (12/31/15 18:58), Serge E. Hallyn wrote: [..] > Thanks! Following trivial patch should fix this: confirmed, thanks! Tested-by: Sergey Senozhatsky -ss > From fc54592077533ff2ff90ed54b72bf03b4378ca9f Mon Sep 17 00:00:00 2001 > From: Serge Hallyn > Date: Thu, 31 Dec 2015 16:55:19 -0800 > Subject: [PATCH 1/1] cgroup_release_agent: grab css_set_lock around > cgroup_path() > > Reported-by: Sergey Senozhatsky > Signed-off-by: Serge Hallyn > --- > kernel/cgroup.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/kernel/cgroup.c b/kernel/cgroup.c > index 4812f59..d10f127 100644 > --- a/kernel/cgroup.c > +++ b/kernel/cgroup.c > @@ -5769,7 +5769,9 @@ static void cgroup_release_agent(struct work_struct *work) > if (!pathbuf || !agentbuf) > goto out; > > + spin_lock_bh(&css_set_lock); > path = cgroup_path(cgrp, pathbuf, PATH_MAX); > + spin_unlock_bh(&css_set_lock); > if (!path) > goto out; > > -- > 2.5.0 >