[PATCH] mm: Fix hiding the stack guard page in proc

From: Stefan Bader
Date: Tue Aug 31 2010 - 08:59:30 EST


This is a multi-part message in MIME format.Looking at the other changes I believe that the logic for proc also needs to
look at the previous vma to decide whether to hide the first page of it or not.
The following patch against current head should fix that (only compile tested here .
I only made the change to task_mmu.c here. But basically its the same check as
in mlock.c. Maybe its would be worth moving the inlines to mm.h.

-Stefan

Current output before:
...
b778e000-b7790000 rw-p 00000000 00:00 0
bfdc8000-bfddd000 rw-p 00000000 00:00 0 [stack]

After mlocking parts of the stack:
...
b778d000-b7790000 rw-p 00000000 00:00 0
bfdc8000-bfdda000 rw-p 00000000 00:00 0
bfddb000-bfddb000 rw-p 00000000 00:00 0 [stack]
bfddc000-bfddd000 rw-p 00000000 00:00 0