From: Tejun Heo Subject: Re: [PATCH] cgroups: fix a css_set not found bug in cgroup_attach_proc Date: Thu, 15 Dec 2011 13:23:29 -0800 Message-ID: <20111215212329.GH32002__4005.3988610909$1323984228$gmane$org@google.com> References: <1323977803-5385-1-git-send-email-msb@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1323977803-5385-1-git-send-email-msb-F7+t8E8rja9g9hUCZPvPmw@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: Mandeep Singh Baines Cc: Olof Johansson , Frederic Weisbecker , containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Oleg Nesterov , Paul Menage , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andrew Morton , stable-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org List-Id: containers.vger.kernel.org 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? Thanks. -- tejun