diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -1404,6 +1404,19 @@ error = ESTALE; vm_no_fault = 1; } else { + if (ptr->vm_start == vmap->vm_start && + ptr->vm_end <= vmap->vm_end) { + /* + * Userspace wants to grow an existing + * mapping. We already have a + * `vm_object_t' for this mapping. We + * just need to update the `struct + * vm_area_struct` to have the correct + * end address. + */ + ptr->vm_end = vmap->vm_end; + } + error = EEXIST; vm_no_fault = (ptr->vm_ops->fault == NULL); }