Re: [PATCH] pidns: limit the nesting depth of pid namespaces

2012-10-25 Thread Andrey Wagin
2012/10/24 Andrew Morton : > On Wed, 24 Oct 2012 09:38:57 +0400 > Andrey Wagin wrote: > >> > >> > I think that returning -ENOMEM in response to an excessive nesting >> > attempt is misleading - the system *didn't* run out of memory. EINVAL >> > is better? >> >> I chose ENOMEM by analogy with max_

Re: [PATCH] pidns: limit the nesting depth of pid namespaces

2012-10-24 Thread Andrew Morton
On Wed, 24 Oct 2012 09:38:57 +0400 Andrey Wagin wrote: > > > > I think that returning -ENOMEM in response to an excessive nesting > > attempt is misleading - the system *didn't* run out of memory. EINVAL > > is better? > > I chose ENOMEM by analogy with max_pid. When a new PID can not be > all

Re: [PATCH] pidns: limit the nesting depth of pid namespaces

2012-10-23 Thread Andrey Wagin
2012/10/24 Andrew Morton : > On Fri, 12 Oct 2012 16:30:42 +0400 > Andrew Vagin wrote: > >> 'struct pid' is a "variable sized struct" - a header with an array >> of upids at the end. >> >> A size of the array depends on a level (depth) of pid namespaces. Now >> a level of pidns is not limited, so '

Re: [PATCH] pidns: limit the nesting depth of pid namespaces

2012-10-23 Thread Andrew Morton
On Fri, 12 Oct 2012 16:30:42 +0400 Andrew Vagin wrote: > 'struct pid' is a "variable sized struct" - a header with an array > of upids at the end. > > A size of the array depends on a level (depth) of pid namespaces. Now > a level of pidns is not limited, so 'struct pid' can be more than one > p

Re: [PATCH] pidns: limit the nesting depth of pid namespaces

2012-10-20 Thread Oleg Nesterov
On 10/12, Andrew Vagin wrote: > > 'struct pid' is a "variable sized struct" - a header with an array > of upids at the end. > > A size of the array depends on a level (depth) of pid namespaces. Now > a level of pidns is not limited, so 'struct pid' can be more than one > page. > > Looks reasonable,

Re: [PATCH] pidns: limit the nesting depth of pid namespaces

2012-10-19 Thread Andrey Wagin
Hello Andrew and Oleg, Andrew, what do you think about this patch? I reworked it according with your comments to the previous version. Oleg, could you send Ack in this version, if it's ok for you. Thanks. 2012/10/12 Andrew Vagin : > 'struct pid' is a "variable sized struct" - a header with an a