aboutsummaryrefslogtreecommitdiff
path: root/sys/vm/vm_map.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm/vm_map.c')
-rw-r--r--sys/vm/vm_map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 2501e08..11222e0 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -287,7 +287,6 @@ munmap(void *addr, size_t len)
size_t map_len, granule;
vaddr_t map_start, map_end;
- spinlock_acquire(&td->mapspace_lock);
ms = &td->mapspace;
granule = vm_get_page_size();
@@ -296,6 +295,7 @@ munmap(void *addr, size_t len)
return -1;
}
+ spinlock_acquire(&td->mapspace_lock);
map_start = mapping->range.start;
map_end = mapping->range.end;
map_len = map_end - map_start;