diff options
Diffstat (limited to 'mm/mlock.c')
-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 3f82720e0515..49e5e4cb8232 100644 --- a/mm/mlock.c +++ b/mm/mlock.c | |||
@@ -167,6 +167,14 @@ static long __mlock_vma_pages_range(struct vm_area_struct *vma, | |||
167 | if (vma->vm_flags & VM_WRITE) | 167 | if (vma->vm_flags & VM_WRITE) |
168 | gup_flags |= FOLL_WRITE; | 168 | gup_flags |= FOLL_WRITE; |
169 | 169 | ||
170 | /* We don't try to access the guard page of a stack vma */ | ||
171 | if (vma->vm_flags & VM_GROWSDOWN) { | ||
172 | if (start == vma->vm_start) { | ||
173 | start += PAGE_SIZE; | ||
174 | nr_pages--; | ||
175 | } | ||
176 | } | ||
177 | |||
170 | while (nr_pages > 0) { | 178 | while (nr_pages > 0) { |
171 | int i; | 179 | int i; |
172 | 180 | ||