mm: make the mlock() stack guard page checks stricter
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 20 Aug 2010 23:39:25 +0000 (16:39 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 26 Aug 2010 23:45:56 +0000 (16:45 -0700)
commite89cfc48a21fa83088e083fe6341ff803ab32f8e
tree9327de36dfce81f3085fe44f44c049b018160bfe
parentf5981434834ad0373b8fc58deabf6493564ae42a
mm: make the mlock() stack guard page checks stricter

commit 7798330ac8114c731cfab83e634c6ecedaa233d7 upstream.

If we've split the stack vma, only the lowest one has the guard page.
Now that we have a doubly linked list of vma's, checking this is trivial.

Tested-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mm/mlock.c