Commit:     73507f335f406ff31ceb97b39fa76eaee00f4f26
Parent:     b450129554213a4d4c5932f8a293646c029e1b0a
Author:     Pavel Emelyanov <[EMAIL PROTECTED]>
AuthorDate: Thu Feb 7 00:14:47 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Feb 7 08:42:22 2008 -0800

    Handle pid namespaces in cgroups code
    There's one place that works with task pids - its the "tasks" file in 
     The read/write handlers assume, that the pid values go to/come from the 
    space and thus it is a virtual pid, i.e.  the pid as it is seen from inside 
    Tune the code accordingly.
    Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]>
    Cc: "Eric W. Biederman" <[EMAIL PROTECTED]>
    Acked-by: Paul Menage <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 kernel/cgroup.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 2c5cccb..4766bb6 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1269,7 +1269,7 @@ static int attach_task_by_pid(struct cgroup *cgrp, char 
        if (pid) {
-               tsk = find_task_by_pid(pid);
+               tsk = find_task_by_vpid(pid);
                if (!tsk || tsk->flags & PF_EXITING) {
                        return -ESRCH;
@@ -1955,7 +1955,7 @@ static int pid_array_load(pid_t *pidarray, int npids, 
struct cgroup *cgrp)
        while ((tsk = cgroup_iter_next(cgrp, &it))) {
                if (unlikely(n == npids))
-               pidarray[n++] = task_pid_nr(tsk);
+               pidarray[n++] = task_pid_vnr(tsk);
        cgroup_iter_end(cgrp, &it);
        return n;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to