[Devel] Re: [PATCH][BUGFIX] cgroups: fix pid namespace bug

2009-07-04 Thread Eric W. Biederman
Paul Menage writes: > On Thu, Jul 2, 2009 at 6:26 AM, Serge E. Hallyn wrote: >> Quoting Li Zefan (l...@cn.fujitsu.com): >>> Paul Menage wrote: >>> > On Wed, Jul 1, 2009 at 7:17 PM, Li Zefan wrote: >>> >> But I guess we are going to fix the bug for 2.6.31? So is it ok to >>> >> merge a new feature

[Devel] Re: [PATCH][BUGFIX] cgroups: fix pid namespace bug

2009-07-02 Thread Paul Menage
On Thu, Jul 2, 2009 at 4:20 PM, Andrew Morton wrote: > > I do think we should lean toward fixing it.  After all, it used to work > OK and now it doesn't. > > It is a three-minute matter of patch-wrangling to take the fix out > again within a more comprehensive 2.6.32 patch series, so that's not an

[Devel] Re: [PATCH][BUGFIX] cgroups: fix pid namespace bug

2009-07-02 Thread Andrew Morton
On Thu, 2 Jul 2009 09:27:20 -0700 Paul Menage wrote: > On Thu, Jul 2, 2009 at 9:15 AM, Serge E. Hallyn wrote: > >> > >> Well, pid namespaces are marked as experimental, as are user > >> namespaces (and were described as "very incomplete" a few months > > > > incomplete (due to signaling issues wh

[Devel] Re: [PATCH][BUGFIX] cgroups: fix pid namespace bug

2009-07-02 Thread Serge E. Hallyn
Quoting Paul Menage (men...@google.com): > On Thu, Jul 2, 2009 at 9:37 AM, Serge E. Hallyn wrote: > > > >        1. the only way it won't outlive the open file is if the > >                task opens the file, hands the open fd over a > >                unix socket, then exits as the last task of i

[Devel] Re: [PATCH][BUGFIX] cgroups: fix pid namespace bug

2009-07-02 Thread Paul Menage
On Thu, Jul 2, 2009 at 9:37 AM, Serge E. Hallyn wrote: > >        1. the only way it won't outlive the open file is if the >                task opens the file, hands the open fd over a >                unix socket, then exits as the last task of its >                pidns Right. >        2. We d

[Devel] Re: [PATCH][BUGFIX] cgroups: fix pid namespace bug

2009-07-02 Thread Serge E. Hallyn
Quoting Paul Menage (men...@google.com): > On Wed, Jul 1, 2009 at 6:24 PM, Li Zefan wrote: > > +       cp = kzalloc(sizeof(*cp), GFP_KERNEL); > > +       if (!cp) { > > +               up_write(&cgrp->pids_mutex); > > +               kfree(pidarray); > > +               return -ENOMEM; > > +      

[Devel] Re: [PATCH][BUGFIX] cgroups: fix pid namespace bug

2009-07-02 Thread Paul Menage
On Thu, Jul 2, 2009 at 9:15 AM, Serge E. Hallyn wrote: >> >> Well, pid namespaces are marked as experimental, as are user >> namespaces (and were described as "very incomplete" a few months > > incomplete (due to signaling issues which have mostly been resolved) > but stable and usable. > > user na

[Devel] Re: [PATCH][BUGFIX] cgroups: fix pid namespace bug

2009-07-02 Thread Paul Menage
On Wed, Jul 1, 2009 at 6:24 PM, Li Zefan wrote: > The bug was introduced by commit cc31edceee04a7b87f2be48f9489ebb72d264844 > ("cgroups: convert tasks file to use a seq_file with shared pid array"). > > We cache a pid array for all threads that are opening the same "tasks" > file, but the pids in t

[Devel] Re: [PATCH][BUGFIX] cgroups: fix pid namespace bug

2009-07-02 Thread Serge E. Hallyn
Quoting Paul Menage (men...@google.com): > On Thu, Jul 2, 2009 at 6:26 AM, Serge E. Hallyn wrote: > > Quoting Li Zefan (l...@cn.fujitsu.com): > >> Paul Menage wrote: > >> > On Wed, Jul 1, 2009 at 7:17 PM, Li Zefan wrote: > >> >> But I guess we are going to fix the bug for 2.6.31? So is it ok to > >

[Devel] Re: [PATCH][BUGFIX] cgroups: fix pid namespace bug

2009-07-02 Thread Paul Menage
On Thu, Jul 2, 2009 at 6:26 AM, Serge E. Hallyn wrote: > Quoting Li Zefan (l...@cn.fujitsu.com): >> Paul Menage wrote: >> > On Wed, Jul 1, 2009 at 7:17 PM, Li Zefan wrote: >> >> But I guess we are going to fix the bug for 2.6.31? So is it ok to >> >> merge a new feature 'cgroup.procs' together into

[Devel] Re: [PATCH][BUGFIX] cgroups: fix pid namespace bug

2009-07-02 Thread Serge E. Hallyn
Quoting Li Zefan (l...@cn.fujitsu.com): > The bug was introduced by commit cc31edceee04a7b87f2be48f9489ebb72d264844 > ("cgroups: convert tasks file to use a seq_file with shared pid array"). > > We cache a pid array for all threads that are opening the same "tasks" > file, but the pids in the arra

[Devel] Re: [PATCH][BUGFIX] cgroups: fix pid namespace bug

2009-07-02 Thread Serge E. Hallyn
Quoting Li Zefan (l...@cn.fujitsu.com): > Paul Menage wrote: > > On Wed, Jul 1, 2009 at 7:17 PM, Li Zefan wrote: > >> But I guess we are going to fix the bug for 2.6.31? So is it ok to > >> merge a new feature 'cgroup.procs' together into 2.6.31? > >> > > > > Does this bug really need to be fixed

[Devel] Re: [PATCH][BUGFIX] cgroups: fix pid namespace bug

2009-07-02 Thread Balbir Singh
* KAMEZAWA Hiroyuki [2009-07-02 10:57:07]: > On Wed, 1 Jul 2009 18:36:36 -0700 > Paul Menage wrote: > > > Thanks Li - but as I said to Serge in the email when I brought this up > > originally, I already had a patch in mind for this; I've had an intern > > (Ben) at Google working on it. His patc

[Devel] Re: [PATCH][BUGFIX] cgroups: fix pid namespace bug

2009-07-01 Thread Li Zefan
Paul Menage wrote: > Thanks Li - but as I said to Serge in the email when I brought this up > originally, I already had a patch in mind for this; I've had an intern > (Ben) at Google working on it. His patch (pretty much ready, and being > sent out tomorrow I hope) is pretty similar to yours, but h

[Devel] Re: [PATCH][BUGFIX] cgroups: fix pid namespace bug

2009-07-01 Thread Li Zefan
Paul Menage wrote: > On Wed, Jul 1, 2009 at 7:17 PM, Li Zefan wrote: >> But I guess we are going to fix the bug for 2.6.31? So is it ok to >> merge a new feature 'cgroup.procs' together into 2.6.31? >> > > Does this bug really need to be fixed for 2.6.31? I didn't think that > the namespace suppor

[Devel] Re: [PATCH][BUGFIX] cgroups: fix pid namespace bug

2009-07-01 Thread Paul Menage
On Wed, Jul 1, 2009 at 7:17 PM, Li Zefan wrote: > > But I guess we are going to fix the bug for 2.6.31? So is it ok to > merge a new feature 'cgroup.procs' together into 2.6.31? > Does this bug really need to be fixed for 2.6.31? I didn't think that the namespace support in mainline was robust eno

[Devel] Re: [PATCH][BUGFIX] cgroups: fix pid namespace bug

2009-07-01 Thread KAMEZAWA Hiroyuki
On Wed, 1 Jul 2009 18:36:36 -0700 Paul Menage wrote: > Thanks Li - but as I said to Serge in the email when I brought this up > originally, I already had a patch in mind for this; I've had an intern > (Ben) at Google working on it. His patch (pretty much ready, and being > sent out tomorrow I hop

[Devel] Re: [PATCH][BUGFIX] cgroups: fix pid namespace bug

2009-07-01 Thread Li Zefan
Paul Menage wrote: > Thanks Li - but as I said to Serge in the email when I brought this up > originally, I already had a patch in mind for this; I've had an intern > (Ben) at Google working on it. His patch (pretty much ready, and being > sent out tomorrow I hope) is pretty similar to yours, but h

[Devel] Re: [PATCH][BUGFIX] cgroups: fix pid namespace bug

2009-07-01 Thread Paul Menage
Thanks Li - but as I said to Serge in the email when I brought this up originally, I already had a patch in mind for this; I've had an intern (Ben) at Google working on it. His patch (pretty much ready, and being sent out tomorrow I hope) is pretty similar to yours, but his is on top of another pat