diff options
author | Al Viro <viro@ZenIV.linux.org.uk> | 2012-03-05 01:39:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-05 16:51:32 -0500 |
commit | 835ee7978cb47de94cf70232a694f19295d2993f (patch) | |
tree | 0befe356dba1efbe02bf7ced7285f7dea94936fd /mm/mmap.c | |
parent | 6414fa6a150111750011f477899d370244da4171 (diff) |
VM_GROWS{UP,DOWN} shouldn't be set on shmem VMAs
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/mmap.c')
-rw-r--r-- | mm/mmap.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1293,6 +1293,8 @@ munmap_back: | |||
1293 | pgoff = vma->vm_pgoff; | 1293 | pgoff = vma->vm_pgoff; |
1294 | vm_flags = vma->vm_flags; | 1294 | vm_flags = vma->vm_flags; |
1295 | } else if (vm_flags & VM_SHARED) { | 1295 | } else if (vm_flags & VM_SHARED) { |
1296 | if (unlikely(vm_flags & (VM_GROWSDOWN|VM_GROWSUP))) | ||
1297 | goto free_vma; | ||
1296 | error = shmem_zero_setup(vma); | 1298 | error = shmem_zero_setup(vma); |
1297 | if (error) | 1299 | if (error) |
1298 | goto free_vma; | 1300 | goto free_vma; |