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 expan

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 i

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 ma

[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: t