]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/mlock.c: document scary-looking stack expansion mlock chain
authorJohannes Weiner <hannes@cmpxchg.org>
Thu, 7 Feb 2013 01:27:04 +0000 (12:27 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 18 Feb 2013 05:46:49 +0000 (16:46 +1100)
commit5195d0deceeda8eee7cf44c733fd45e3758bd2b2
tree663420eb510429b12c4ced99f906a6914835ed24
parentbdce08fb9964867d73ce5eb951258d2bea74421c
mm/mlock.c: document scary-looking stack expansion mlock chain

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: the stack expansion mlocks only the newly
expanded range and so will not result in recursive expansion.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mlock.c