dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Al Viro 2012-03-05 06:39:47 +00:00 committed by Linus Torvalds
parent 6414fa6a15
commit 835ee7978c
1 changed files with 2 additions and 0 deletions

View File

@ -1293,6 +1293,8 @@ munmap_back:
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;