All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue@us.ibm.com>
To: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>, Paul Menage <menage@google.com>,
	Dan Smith <danms@us.ibm.com>
Subject: Re: [PATCH] cgroup_clone: use pid of newly created task for new cgroup
Date: Thu, 12 Jun 2008 15:37:19 -0500	[thread overview]
Message-ID: <20080612203719.GA20755@us.ibm.com> (raw)
In-Reply-To: <20080611193540.GC13365@us.ibm.com>

Quoting Serge E. Hallyn (serue@us.ibm.com):
> cgroup_clone creates a new cgroup with the pid of the task.  This works
> correctly for unshare, but for clone cgroup_clone is called from
> copy_namespaces inside copy_process, which happens before the new pid
> is created.  As a result, the new cgroup was created with current's pid.
> This patch:

"I swear it worked yesterday..."  but in any case this fix is needed on
top of the cgroup_clone patch

-serge

>From 8819a1f0e4e5ae9950b8310144b3fda2c30cab08 Mon Sep 17 00:00:00 2001
From: Serge Hallyn <serge@us.ibm.com>
Date: Thu, 12 Jun 2008 15:33:38 -0500
Subject: [PATCH] ns_cgroup: include proc_fs.h

Need proc_fs.h included to slurp the PROC_NUMBUF #define.

Signed-off-by: Serge Hallyn <serge@us.ibm.com>
---
 kernel/ns_cgroup.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/ns_cgroup.c b/kernel/ns_cgroup.c
index 6431fb7..d6895d0 100644
--- a/kernel/ns_cgroup.c
+++ b/kernel/ns_cgroup.c
@@ -9,6 +9,7 @@
 #include <linux/fs.h>
 #include <linux/slab.h>
 #include <linux/nsproxy.h>
+#include <linux/proc_fs.h>
 
 struct ns_cgroup {
 	struct cgroup_subsys_state css;
-- 
1.5.4.3


      reply	other threads:[~2008-06-12 20:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-11 19:35 [PATCH] cgroup_clone: use pid of newly created task for new cgroup Serge E. Hallyn
2008-06-12 20:37 ` Serge E. Hallyn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080612203719.GA20755@us.ibm.com \
    --to=serue@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=danms@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.