PERFORCE change 1199532 for review
John Baldwin
jhb at FreeBSD.org
Mon Sep 8 04:52:52 UTC 2014
http://p4web.freebsd.org/@@1199532?ac=10
Change 1199532 by jhb at jhb_ralph on 2014/08/29 17:49:33
Don't require MAP_SHARED or MAP_PRIVATE with MAP_ANON.
Note that we can't simply for MAP_SHARED on for MAP_ANON
as MAP_SHARED with MAP_ANON determines whether or not
anon regions are shared with future children.
Affected files ...
.. //depot/projects/smpng/sys/vm/vm_mmap.c#106 edit
Differences ...
==== //depot/projects/smpng/sys/vm/vm_mmap.c#106 (text+ko) ====
@@ -248,13 +248,10 @@
return (EINVAL);
if ((prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC | PROT_NONE)) != 0)
return (EINVAL);
-
- /* Exactly one of MAP_SHARED or MAP_PRIVATE must be given. */
- if ((flags & (MAP_SHARED | MAP_PRIVATE)) == 0 ||
+ if ((flags & (MAP_ANON | MAP_SHARED | MAP_PRIVATE)) == 0 ||
(flags & (MAP_SHARED | MAP_PRIVATE)) == (MAP_SHARED | MAP_PRIVATE))
return (EINVAL);
-
/*
* Align the file position to a page boundary,
* and save its page offset component.
More information about the p4-projects
mailing list