commit | 835ee7978cb47de94cf70232a694f19295d2993f | [log] [tgz] |
---|---|---|
author | Al Viro <viro@ZenIV.linux.org.uk> | Mon Mar 05 06:39:47 2012 +0000 |
committer | Linus Torvalds <torvalds@linux-foundation.org> | Mon Mar 05 13:51:32 2012 -0800 |
tree | 0befe356dba1efbe02bf7ced7285f7dea94936fd | |
parent | 6414fa6a150111750011f477899d370244da4171 [diff] [blame] |
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>
diff --git a/mm/mmap.c b/mm/mmap.c index 3f758c7..22e1a0b 100644 --- a/mm/mmap.c +++ b/mm/mmap.c
@@ -1293,6 +1293,8 @@ pgoff = vma->vm_pgoff; vm_flags = vma->vm_flags; } else if (vm_flags & VM_SHARED) { + if (unlikely(vm_flags & (VM_GROWSDOWN|VM_GROWSUP))) + goto free_vma; error = shmem_zero_setup(vma); if (error) goto free_vma;