From fd859eb599fa15e9d6592171a54687f9bab7d6ef Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Fri, 13 Apr 2018 08:44:24 +0200 Subject: [PATCH] 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 --- man2/mmap.2 | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/man2/mmap.2 b/man2/mmap.2 index 2be1ba718..2d727a764 100644 --- a/man2/mmap.2 +++ b/man2/mmap.2 @@ -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