Re: [PATCH 1/1] kernel/pid_namespace.c: Fixing a lack of cleanup (Probable resources leak).

2013-03-04 Thread Eric W. Biederman
"Raphael S.Carvalho" writes: > Starting point: create_pid_namespace() > > Suppose create_pid_cachep() was executed sucessfully, thus: > pcache was allocated by kmalloc(). > cachep received a cache created by kmem_cache_create(). > and pcache->list was added to the list pid_caches_lh. > > So what

Re: [PATCH 1/1] kernel/pid_namespace.c: Fixing a lack of cleanup (Probable resources leak).

2013-03-04 Thread Cyrill Gorcunov
On Tue, Mar 05, 2013 at 02:04:45AM -0300, Raphael S Carvalho wrote: > > > > Actually I noticed this problem and I think it is not a BUG. > > Since the pid_cache is created for all pid namespace which have the same > > level. > > Even this pid namespace is failed to create, the pid_cache will not b

Re: [PATCH 1/1] kernel/pid_namespace.c: Fixing a lack of cleanup (Probable resources leak).

2013-03-04 Thread Raphael S Carvalho
On Tue, Mar 5, 2013 at 12:51 AM, Gao feng wrote: > On 2013/03/05 11:26, Eric W. Biederman wrote: >> From: Raphael S.Carvalho >> >> Starting point: create_pid_namespace() >> >> Suppose create_pid_cachep() was executed sucessfully, thus: >> pcache was allocated by kmalloc(). >> cachep received a ca

Re: [PATCH 1/1] kernel/pid_namespace.c: Fixing a lack of cleanup (Probable resources leak).

2013-03-04 Thread Gao feng
On 2013/03/05 11:26, Eric W. Biederman wrote: > From: Raphael S.Carvalho > > Starting point: create_pid_namespace() > > Suppose create_pid_cachep() was executed sucessfully, thus: > pcache was allocated by kmalloc(). > cachep received a cache created by kmem_cache_create(). > and pcache->list wa

[PATCH 1/1] kernel/pid_namespace.c: Fixing a lack of cleanup (Probable resources leak).

2013-03-04 Thread Raphael S.Carvalho
Starting point: create_pid_namespace() Suppose create_pid_cachep() was executed sucessfully, thus: pcache was allocated by kmalloc(). cachep received a cache created by kmem_cache_create(). and pcache->list was added to the list pid_caches_lh. So what would happen if proc_alloc_inum() returns an

[PATCH 1/1] kernel/pid_namespace.c: Fixing a lack of cleanup (Probable resources leak).

2013-03-04 Thread Eric W. Biederman
From: Raphael S.Carvalho Starting point: create_pid_namespace() Suppose create_pid_cachep() was executed sucessfully, thus: pcache was allocated by kmalloc(). cachep received a cache created by kmem_cache_create(). and pcache->list was added to the list pid_caches_lh. So what would happen if pr