]> git.baikalelectronics.ru Git - kernel.git/commit
mm/mlock.c: document scary-looking stack expansion mlock chain
authorJohannes Weiner <hannes@cmpxchg.org>
Sat, 23 Feb 2013 00:35:20 +0000 (16:35 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 24 Feb 2013 01:50:20 +0000 (17:50 -0800)
commitbba94ab1fa62d600521fe866d7847aef24280385
tree65d574e7ee8068597f59b712417b6ecf700d1a49
parentdc873d5d68c66667de53be92a20794dec4c753b4
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>
Acked-by: Michel Lespinasse <walken@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/mlock.c