Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 835ee797 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds
Browse files

VM_GROWS{UP,DOWN} shouldn't be set on shmem VMAs

parent 6414fa6a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1293,6 +1293,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
		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;