Re: [patch] mm: mlock: document scary-looking stack expansion mlock chain

2013-02-20 Thread Michel Lespinasse
On Fri, Feb 1, 2013 at 2:10 PM, Johannes Weiner wrote: > The fact that mlock calls get_user_pages, and get_user_pages might > call mlock when expanding a stack looks like a potential recursion. > > However, mlock makes sure the requested range is already contained > within a vma, so no stack

Re: [patch] mm: mlock: document scary-looking stack expansion mlock chain

2013-02-20 Thread Michel Lespinasse
On Wed, Feb 20, 2013 at 8:51 PM, Ric Mason wrote: > On 02/01/2013 02:10 PM, Johannes Weiner wrote: >> >> The fact that mlock calls get_user_pages, and get_user_pages might >> call mlock when expanding a stack looks like a potential recursion. > > Why expand stack need call mlock? I can't find it

Re: [patch] mm: mlock: document scary-looking stack expansion mlock chain

2013-02-20 Thread Ric Mason
On 02/01/2013 02:10 PM, Johannes Weiner wrote: The fact that mlock calls get_user_pages, and get_user_pages might call mlock when expanding a stack looks like a potential recursion. Why expand stack need call mlock? I can't find it in the codes, could you point out to me? However, mlock

Re: [patch] mm: mlock: document scary-looking stack expansion mlock chain

2013-02-20 Thread Ric Mason
On 02/01/2013 02:10 PM, Johannes Weiner wrote: The fact that mlock calls get_user_pages, and get_user_pages might call mlock when expanding a stack looks like a potential recursion. Why expand stack need call mlock? I can't find it in the codes, could you point out to me? However, mlock

Re: [patch] mm: mlock: document scary-looking stack expansion mlock chain

2013-02-20 Thread Michel Lespinasse
On Wed, Feb 20, 2013 at 8:51 PM, Ric Mason ric.mas...@gmail.com wrote: On 02/01/2013 02:10 PM, Johannes Weiner wrote: The fact that mlock calls get_user_pages, and get_user_pages might call mlock when expanding a stack looks like a potential recursion. Why expand stack need call mlock? I

Re: [patch] mm: mlock: document scary-looking stack expansion mlock chain

2013-02-20 Thread Michel Lespinasse
On Fri, Feb 1, 2013 at 2:10 PM, Johannes Weiner han...@cmpxchg.org wrote: The fact that mlock calls get_user_pages, and get_user_pages might call mlock when expanding a stack looks like a potential recursion. However, mlock makes sure the requested range is already contained within a vma, so

[patch] mm: mlock: document scary-looking stack expansion mlock chain

2013-01-31 Thread Johannes Weiner
The fact that mlock calls get_user_pages, and get_user_pages might call mlock when expanding a stack looks like a potential recursion. However, mlock makes sure the requested range is already contained within a vma, so no stack expansion will actually happen from mlock. Should this ever change:

[patch] mm: mlock: document scary-looking stack expansion mlock chain

2013-01-31 Thread Johannes Weiner
The fact that mlock calls get_user_pages, and get_user_pages might call mlock when expanding a stack looks like a potential recursion. However, mlock makes sure the requested range is already contained within a vma, so no stack expansion will actually happen from mlock. Should this ever change: