mmap.2: Simplify mention of MAP_FIXED_NOREPLACE in the discussion of MAP_FIXED

After discussions with Jann Horn and John Hubbard.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2018-04-13 08:44:24 +02:00
parent 528cc762d9
commit fd859eb599
1 changed files with 4 additions and 9 deletions

View File

@ -285,15 +285,10 @@ and the PAM libraries
.UR http://www.linux-pam.org
.UE .
.IP
For cases in which the specified memory region has not been reserved using an
existing mapping, newer kernels (Linux 4.17 and later) provide an option
.B MAP_FIXED_NOREPLACE
that should be used instead; older kernels require the caller to use
.I addr
as a hint (without
.BR MAP_FIXED )
and take appropriate action if the kernel places the new mapping at a
different address.
Since Linux 4.17, the
.BR MAP_FIXED_NOREPLACE
flag can be used in a multithreaded program to avoid the hazard
described above.
.TP
.BR MAP_FIXED_NOREPLACE " (since Linux 4.17)"
.\" commit a4ff8e8620d3f4f50ac4b41e8067b7d395056843