mmap.2: Minor wording improvements to text on MAP_FIXED hazard

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2018-04-13 09:20:24 +02:00
parent 0949fa5efd
commit 56f85b84df
1 changed files with 4 additions and 3 deletions

View File

@ -743,12 +743,13 @@ making it easy for a multithreaded process to corrupt its own address space.
.PP
For example, suppose that thread A looks through
.I /proc/<pid>/maps
and locates an available address range,
and in order to locate an unused address range that it can map using
.BR MAP_FIXED ,
while thread B simultaneously acquires part or all of that same
address range.
Thread A then calls
When thread A subsequently employs
.BR mmap(MAP_FIXED) ,
effectively overwriting the mapping that thread B created.
it will effectively clobber the mapping that thread B created.
In this scenario,
thread B need not create a mapping directly; simply making a library call
that, internally, uses