diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mlock.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mm/mlock.c b/mm/mlock.c index 2e05c97b04f..524d2a444ef 100644 --- a/mm/mlock.c +++ b/mm/mlock.c @@ -170,6 +170,14 @@ static long __mlock_vma_pages_range(struct vm_area_struct *vma, if (vma->vm_flags & VM_WRITE) gup_flags |= FOLL_WRITE; + /* We don't try to access the guard page of a stack vma */ + if (vma->vm_flags & VM_GROWSDOWN) { + if (start == vma->vm_start) { + start += PAGE_SIZE; + nr_pages--; + } + } + while (nr_pages > 0) { int i; |