]> git.ipfire.org Git - thirdparty/man-pages.git/commit
mmap.2: Fix EINVAL conditions
authorNikola Forró <nforro@redhat.com>
Mon, 24 Jun 2019 11:20:55 +0000 (13:20 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 13 Sep 2019 14:26:22 +0000 (16:26 +0200)
commitc4f0c33fb6feb64bd49d83973134e84964ab9908
treefc753faa1006006d744524997a6b6427dbb73178
parent89524684094516a79921df0e30a9e07e7a4cd6dc
mmap.2: Fix EINVAL conditions

Since introduction of MAP_SHARED_VALIDATE, in case flags contain
both MAP_PRIVATE and MAP_SHARED, mmap() doesn't fail with EINVAL,
it succeeds.

The reason for that is that MAP_SHARED_VALIDATE is in fact equal
to MAP_PRIVATE | MAP_SHARED.

This is intended behavior, see:
https://lwn.net/Articles/758594/
https://lwn.net/Articles/758598/

Signed-off-by: Nikola Forró <nforro@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/mmap.2