Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 209468
b: refs/heads/master
c: d782437
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Aug 15, 2010
1 parent 3dcf965 commit e1640b8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1b68c9596ce17a1e06918ed65fc3d19b92b04aab
refs/heads/master: d7824370e26325c881b665350ce64fb0a4fde24a
8 changes: 7 additions & 1 deletion trunk/fs/proc/task_mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
int flags = vma->vm_flags;
unsigned long ino = 0;
unsigned long long pgoff = 0;
unsigned long start;
dev_t dev = 0;
int len;

Expand All @@ -220,8 +221,13 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
}

/* We don't show the stack guard page in /proc/maps */
start = vma->vm_start;
if (vma->vm_flags & VM_GROWSDOWN)
start += PAGE_SIZE;

seq_printf(m, "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu %n",
vma->vm_start,
start,
vma->vm_end,
flags & VM_READ ? 'r' : '-',
flags & VM_WRITE ? 'w' : '-',
Expand Down
8 changes: 8 additions & 0 deletions trunk/mm/mlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,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;

Expand Down

0 comments on commit e1640b8

Please sign in to comment.