summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_map.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2014-06-26 08:30:08 +0000
committerkib <kib@FreeBSD.org>2014-06-26 08:30:08 +0000
commit15d33955d24d5a4bf051e41cff28951c6c2a54f2 (patch)
tree2c593f33e1723fee9862fe84487989f08054fd73 /sys/vm/vm_map.c
parentb371ec04aaeccdccafd21a04b949901c090e50cb (diff)
downloadFreeBSD-src-15d33955d24d5a4bf051e41cff28951c6c2a54f2.zip
FreeBSD-src-15d33955d24d5a4bf051e41cff28951c6c2a54f2.tar.gz
MFC r267630:
Add MAP_EXCL flag for mmap(2).
Diffstat (limited to 'sys/vm/vm_map.c')
-rw-r--r--sys/vm/vm_map.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 1cc125b..62785f1 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -1407,7 +1407,8 @@ vm_map_fixed(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
("vm_map_fixed: non-NULL backing object for stack"));
vm_map_lock(map);
VM_MAP_RANGE_CHECK(map, start, end);
- (void) vm_map_delete(map, start, end);
+ if ((cow & MAP_CHECK_EXCL) == 0)
+ vm_map_delete(map, start, end);
if ((cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP)) != 0) {
result = vm_map_stack_locked(map, start, length, sgrowsiz,
prot, max, cow);
OpenPOWER on IntegriCloud