[Devel] Re: [PATCH v5 2/3] cgroups: add can_attach callback for checking all threads in a group

Paul Menage menage at google.com
Mon Aug 23 16:31:47 PDT 2010


On Tue, Aug 10, 2010 at 10:48 PM, Ben Blum <bblum at andrew.cmu.edu> wrote:
>
> Add cgroup wrapper for safely calling can_attach on all threads in a threadgroup
>
> From: Ben Blum <bblum at andrew.cmu.edu>
>
> This patch adds a function cgroup_can_attach_per_thread which handles iterating
> over each thread in a threadgroup safely with respect to the invariants that
> will be used in cgroup_attach_proc. Also, subsystems whose can_attach calls
> require per-thread validation are modified to use the per_thread wrapper to
> avoid duplicating cgroup-internal code.
>
> This is a pre-patch for cgroup-procs-writable.patch.
>
> Signed-off-by: Ben Blum <bblum at andrew.cmu.edu>

Acked-by: Paul Menage <menage at google.com>

Some of the can_attach() methods could be simplified slightly by
directly returning the result of cgroup_can_attach_per_thread()

Paul
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list