mm: make stack guard page logic use vm_prev pointer
commit7ddb5ec3fdd06d769f58a4d68fa4c3f7de26f2fb
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 20 Aug 2010 23:49:40 +0000 (20 16:49 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 26 Aug 2010 23:43:39 +0000 (26 16:43 -0700)
tree5225a3368c80308676aed512c2d81460e7b7192d
parent259756fcc66e2d6dd732c0b4ff99f825e69b3ba2
mm: make stack guard page logic use vm_prev pointer

commit 0e8e50e20c837eeec8323bba7dcd25fe5479194c upstream.

Like the mlock() change previously, this makes the stack guard check
code use vma->vm_prev to see what the mapping below the current stack
is, rather than have to look it up with find_vma().

Also, accept an abutting stack segment, since that happens naturally if
you split the stack with mlock or mprotect.

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/memory.c