HomeFreeBSD

Clear the MAP_WIREFUTURE flag on the vm map in exec_new_vmspace() when it

Description

Clear the MAP_WIREFUTURE flag on the vm map in exec_new_vmspace() when it
recycles the current vm space. Otherwise, an mlockall(MCL_FUTURE) could
still be in effect on the process after an execve(2), which violates the
specification for mlockall(2).

It's pointless for vm_map_stack() to check the MEMLOCK limit. It will
never be asked to wire the stack. Moreover, it doesn't even implement
wiring of the stack.

Reviewed by: kib, markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D11421

Details

Provenance
alcAuthored on
Reviewer
kib
Differential Revision
D11421: Fix MAP_WIREFUTURE leakage
Parents
rS320497: Remove a blank line accidentally added in r320403.
Branches
Unknown
Tags
Unknown