[lkml]   [2012]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[24/67] cgroups: fix a css_set not found bug in cgroup_attach_proc
    3.0-stable review patch.  If anyone has any objections, please let me know.


    From: Mandeep Singh Baines <>

    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

    $ cat zombie.c
    \#include <unistd.h>

    int main()
    if (fork())
    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 <>
    Reviewed-by: Li Zefan <>
    Signed-off-by: Tejun Heo <>
    Cc: KAMEZAWA Hiroyuki <>
    Cc: Frederic Weisbecker <>
    Cc: Oleg Nesterov <>
    Cc: Andrew Morton <>
    Cc: Paul Menage <>
    Cc: Olof Johansson <>
    Signed-off-by: Greg Kroah-Hartman <>

    kernel/cgroup.c | 5 -----
    1 file changed, 5 deletions(-)

    --- a/kernel/cgroup.c
    +++ b/kernel/cgroup.c
    @@ -2095,11 +2095,6 @@ int cgroup_attach_proc(struct cgroup *cg
    /* 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;

     \ /
      Last update: 2012-01-03 23:37    [W:0.021 / U:4.820 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site