03 Apr, 2009

1 commit

  • Since we are in cgroup write handler, so the cgrp is valid, so we don't
    have to hold cgroup_mutex when calling cgroup_task_count(). One similar
    example is in cgroup_tasks_open().

    Signed-off-by: Li Zefan
    Acked-by: Paul Menage
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Li Zefan
     

20 Oct, 2008

1 commit

  • put_css_set_taskexit may be called when find_css_set is called on other
    cpu. And the race will occur:

    put_css_set_taskexit side find_css_set side

    |
    atomic_dec_and_test(&kref->refcount) |
    /* kref->refcount = 0 */ |
    ....................................................................
    | read_lock(&css_set_lock)
    | find_existing_css_set
    | get_css_set
    | read_unlock(&css_set_lock);
    ....................................................................
    __release_css_set |
    ....................................................................
    | /* use a released css_set */
    |

    [put_css_set is the same. But in the current code, all put_css_set are
    put into cgroup mutex critical region as the same as find_css_set.]

    [akpm@linux-foundation.org: repair comments]
    [menage@google.com: eliminate race in css_set refcounting]
    Signed-off-by: Lai Jiangshan
    Cc: Balbir Singh
    Cc: KAMEZAWA Hiroyuki
    Signed-off-by: Paul Menage
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lai Jiangshan
     

29 Apr, 2008

2 commits

  • The "releasable" control file provided by the cgroup framework exports the
    state of a per-cgroup flag that's related to the notify-on-release feature.
    This isn't really generally useful, unless you're trying to debug this
    particular feature of cgroups.

    This patch moves the "releasable" file to the cgroup_debug subsystem.

    Signed-off-by: Paul Menage
    Cc: "Li Zefan"
    Cc: Balbir Singh
    Cc: Paul Jackson
    Cc: Pavel Emelyanov
    Cc: KAMEZAWA Hiroyuki
    Cc: "YAMAMOTO Takashi"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Menage
     
  • Several people have justifiably complained that the "_uint" suffix is
    inappropriate for functions that handle u64 values, so this patch just renames
    all these functions and their users to have the suffic _u64.

    [peterz@infradead.org: build fix]
    Signed-off-by: Paul Menage
    Cc: "Li Zefan"
    Cc: Balbir Singh
    Cc: Paul Jackson
    Cc: Pavel Emelyanov
    Cc: KAMEZAWA Hiroyuki
    Cc: "YAMAMOTO Takashi"
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Menage
     

20 Oct, 2007

1 commit

  • This example subsystem exports debugging information as an aid to diagnosing
    refcount leaks, etc, in the cgroup framework.

    Signed-off-by: Paul Menage
    Cc: Serge E. Hallyn
    Cc: "Eric W. Biederman"
    Cc: Dave Hansen
    Cc: Balbir Singh
    Cc: Paul Jackson
    Cc: Kirill Korotaev
    Cc: Herbert Poetzl
    Cc: Srivatsa Vaddagiri
    Cc: Cedric Le Goater
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Menage