From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH] cgroups: fix a css_set not found bug in cgroup_attach_proc Date: Mon, 19 Dec 2011 09:13:07 -0800 Message-ID: <20111219171307.GG24519@google.com> References: <1323977803-5385-1-git-send-email-msb@chromium.org> <20111215212329.GH32002@google.com> <4EEAA923.5060104@cn.fujitsu.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=wbU0Na25WUrSawwkBz2F4NbhtqBUrAWgJCBaqe/eh/4=; b=CeZ38eTMqmfye5GZH1FnSjk/dzEPBIde803xKjyy/bAra7RJT3Wn4qNBa+HT7uOopu bBYpokxjBytI+a2MFqYOn5xLuPOAtmLMs/EPWjvhL5RmTIKRC6A+6aDmMm8ndcpvxGLM vnTrB2wmedJgTAYODwHcfUnJm6J9AJ6PgSIr4= Content-Disposition: inline In-Reply-To: <4EEAA923.5060104-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Li Zefan Cc: Mandeep Singh Baines , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, stable-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, KAMEZAWA Hiroyuki , Frederic Weisbecker , Oleg Nesterov , Andrew Morton , Paul Menage , Olof Johansson On Fri, Dec 16, 2011 at 10:12:51AM +0800, Li Zefan wrote: > Tejun Heo wrote: > > On Thu, Dec 15, 2011 at 11:36:43AM -0800, Mandeep Singh Baines wrote: > >> There is a BUG when migrating a PF_EXITING proc. Since css_set_prefetch() > >> is not called for the PF_EXITING case, find_existing_css_set() will return > >> NULL inside cgroup_task_migrate() causing a BUG. > >> > >> This bug is easy to reproduce. Create a zombie and echo its pid to > >> cgroup.procs. > >> > >> $ cat zombie.c > >> \#include > >> > >> int main() > >> { > >> if (fork()) > >> pause(); > >> return 0; > >> } > >> $ > >> > >> We are hitting this bug pretty regularly on ChromeOS. > >> > >> This bug is already fixed by Tejun Heo's cgroup patchset which is > >> targetted for the next merge window: > >> > >> https://lkml.org/lkml/2011/11/1/356 > >> > >> I've create a smaller patch here which just fixes this bug so that a > >> fix can be merged into the current release and stable. > > > > Looks safe to me. Li? > > > > It should be fine. > > Reviewed-by: Li Zefan Applied to cgroup/for-fixes-3.2. Will push to Linus in a couple of days. It's already rc6 and a bit late tho. Thank you. -- tejun