Re: [Lxc-users] lxc-attach setns patch for kernel 2.6.34
On 08/04/2010 02:13 AM, Sebastien Pahl wrote: Here is a refreshed patch for 2.6.35. The 2.6.34.2 kernel can use the 2.6.34.1 patch without problems. I tested both and they work. Uploaded ! Thanks Sebastian ! -- This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
[Lxc-users] lxc-attach setns patch for kernel 2.6.34
Hi, I'm trying to adapt the patch for lxc-attach to 2.6.34. A few hunks fail but they are trivial to fix. There is only one where I'm not sure: -- Index: 2.6.33/kernel/cgroup.c === --- 2.6.33.orig/kernel/cgroup.c +++ 2.6.33/kernel/cgroup.c @@ -2453,7 +2453,7 @@ static struct cgroup_pidlist *cgroup_pid { struct cgroup_pidlist *l; /* don't need task_nsproxy() if we're looking at ourself */ - struct pid_namespace *ns = get_pid_ns(current-nsproxy-pid_ns); + struct pid_namespace *ns = get_pid_ns(task_active_pid_ns(current)); /* * We can't drop the pidlist_mutex before taking the l-mutex in case * the last ref-holder is trying to remove l from the list at the same -- The kernel/cgroup.c file has changed: Instead of: struct pid_namespace *ns = get_pid_ns(current-nsproxy-pid_ns); now there is: struct pid_namespace *ns = current-nsproxy-pid_ns; From what I have seen in the rest of the code I assume I can just replace it by this line: struct pid_namespace *ns = task_active_pid_ns(current); Am I correct in my assumptions? -- Sebastien Pahl @sebp -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
[Lxc-users] lxc-attach setns patch for kernel 2.6.34
Hi, I'm trying to adapt the patch for lxc-attach to 2.6.34. A few hunks fail but they are trivial to fix. There is only one where I'm not sure: -- Index: 2.6.33/kernel/cgroup.c === --- 2.6.33.orig/kernel/cgroup.c +++ 2.6.33/kernel/cgroup.c @@ -2453,7 +2453,7 @@ static struct cgroup_pidlist *cgroup_pid { struct cgroup_pidlist *l; /* don't need task_nsproxy() if we're looking at ourself */ - struct pid_namespace *ns = get_pid_ns(current-nsproxy-pid_ns); + struct pid_namespace *ns = get_pid_ns(task_active_pid_ns(current)); /* * We can't drop the pidlist_mutex before taking the l-mutex in case * the last ref-holder is trying to remove l from the list at the same -- The kernel/cgroup.c file has changed: Instead of: struct pid_namespace *ns = get_pid_ns(current-nsproxy-pid_ns); now there is: struct pid_namespace *ns = current-nsproxy-pid_ns; From what I have seen in the rest of the code I assume I can just replace it by this line: struct pid_namespace *ns = task_active_pid_ns(current); Am I correct in my assumptions? -- Sebastien Pahl @sebp -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] lxc-attach setns patch for kernel 2.6.34
Nice thats what I thought. I will build a 2.6.34.1 kernel. If everything works like expected I will send you the updated patchset. Does it have to be in the quilt format? On Wed, Jul 28, 2010 at 01:51, Daniel Lezcano daniel.lezc...@free.fr wrote: On 07/28/2010 10:41 AM, Sebastien Pahl wrote: Hi, I'm trying to adapt the patch for lxc-attach to 2.6.34. A few hunks fail but they are trivial to fix. There is only one where I'm not sure: -- Index: 2.6.33/kernel/cgroup.c === --- 2.6.33.orig/kernel/cgroup.c +++ 2.6.33/kernel/cgroup.c @@ -2453,7 +2453,7 @@ static struct cgroup_pidlist *cgroup_pid { struct cgroup_pidlist *l; /* don't need task_nsproxy() if we're looking at ourself */ - struct pid_namespace *ns = get_pid_ns(current-nsproxy-pid_ns); + struct pid_namespace *ns = get_pid_ns(task_active_pid_ns(current)); /* * We can't drop the pidlist_mutex before taking the l-mutex in case * the last ref-holder is trying to remove l from the list at the same -- The kernel/cgroup.c file has changed: Instead of: struct pid_namespace *ns = get_pid_ns(current-nsproxy-pid_ns); now there is: struct pid_namespace *ns = current-nsproxy-pid_ns; From what I have seen in the rest of the code I assume I can just replace it by this line: struct pid_namespace *ns = task_active_pid_ns(current); Am I correct in my assumptions? Yes, I think so. The get_pid_ns is done later in the code to reduce the rollback code (put_pid_ns) in case of error. As you have the right pid namespace in the 'ns' variable, your modification is correct I think. Thanks -- Daniel -- Sebastien Pahl @sebp -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] lxc-attach setns patch for kernel 2.6.34
On 07/28/2010 10:41 AM, Sebastien Pahl wrote: Hi, I'm trying to adapt the patch for lxc-attach to 2.6.34. A few hunks fail but they are trivial to fix. There is only one where I'm not sure: -- Index: 2.6.33/kernel/cgroup.c === --- 2.6.33.orig/kernel/cgroup.c +++ 2.6.33/kernel/cgroup.c @@ -2453,7 +2453,7 @@ static struct cgroup_pidlist *cgroup_pid { struct cgroup_pidlist *l; /* don't need task_nsproxy() if we're looking at ourself */ - struct pid_namespace *ns = get_pid_ns(current-nsproxy-pid_ns); + struct pid_namespace *ns = get_pid_ns(task_active_pid_ns(current)); /* * We can't drop the pidlist_mutex before taking the l-mutex in case * the last ref-holder is trying to remove l from the list at the same -- The kernel/cgroup.c file has changed: Instead of: struct pid_namespace *ns = get_pid_ns(current-nsproxy-pid_ns); now there is: struct pid_namespace *ns = current-nsproxy-pid_ns; From what I have seen in the rest of the code I assume I can just replace it by this line: struct pid_namespace *ns = task_active_pid_ns(current); Am I correct in my assumptions? yes. here's our patch for 2.6.34 we should be pushing this patchset to mainline kernel. Did Eric plan to do so ? cheers, C. index 6d870f2..0a2e55e 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -2650,7 +2650,7 @@ static struct cgroup_pidlist *cgroup_pidlist_find(struct cgroup *cgrp, { struct cgroup_pidlist *l; /* don't need task_nsproxy() if we're looking at ourself */ - struct pid_namespace *ns = current-nsproxy-pid_ns; + struct pid_namespace *ns = task_active_pid_ns(current); /* * We can't drop the pidlist_mutex before taking the l-mutex in case -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] lxc-attach setns patch for kernel 2.6.34
On 07/28/2010 10:59 AM, Sebastien Pahl wrote: Nice thats what I thought. I will build a 2.6.34.1 kernel. If everything works like expected I will send you the updated patchset. Cool. Thanks ! Does it have to be in the quilt format? Yes if possible. You can send me directly a tarball, I will upload it to the web site. Thanks -- Daniel -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users