--- a/mm/mmap.c~mm-mmap-use-find_vma_intersection-in-do_mmap-for-overlap +++ a/mm/mmap.c @@ -1457,9 +1457,7 @@ unsigned long do_mmap(struct file *file, return addr; if (flags & MAP_FIXED_NOREPLACE) { - struct vm_area_struct *vma = find_vma(mm, addr); - - if (vma && vma->vm_start < addr + len) + if (find_vma_intersection(mm, addr, addr + len)) return -EEXIST; }