path: root/kernel
diff options
authorMandeep Singh Baines <>2011-12-15 11:36:43 -0800
committerRohan Somvanshi <>2012-01-11 09:52:46 -0800
commit2d5ebc34329444db7f46e54ec19d4dc8e60c102a (patch)
tree0eb1097afc1688562e3c0251783e5e0fe4fc8db5 /kernel
parent0746a065d0f10996bae7422896eb885fbbcef393 (diff)
cgroups: fix a css_set not found bug in cgroup_attach_proc
commit e0197aae59e55c06db172bfbe1a1cdb8c0e1cab3 upstream. 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 <unistd.h> 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: 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. Signed-off-by: Mandeep Singh Baines <> Downstream-Bug-Report: Reviewed-by: Li Zefan <> Signed-off-by: Tejun Heo <> Cc: Cc: Cc: KAMEZAWA Hiroyuki <> Cc: Frederic Weisbecker <> Cc: Oleg Nesterov <> Cc: Andrew Morton <> Cc: Paul Menage <> Cc: Olof Johansson <> Signed-off-by: Greg Kroah-Hartman <> Change-Id: I61bf2d48574d6ce5418b988e9547937c2efdd084 Reviewed-on: http://git-master/r/74185 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Rohan Somvanshi <> Tested-by: Rohan Somvanshi <>
Diffstat (limited to 'kernel')
1 files changed, 0 insertions, 5 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index bab5a7911b84..225f47478f34 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -2108,11 +2108,6 @@ int cgroup_attach_proc(struct cgroup *cgrp, struct task_struct *leader)
/* get old css_set pointer */
- if (tsk->flags & PF_EXITING) {
- /* ignore this task if it's going away */
- task_unlock(tsk);
- continue;
- }
oldcg = tsk->cgroups;