diff options
author | Ian Moffett <ian@osmora.org> | 2024-05-25 23:25:11 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-05-25 23:25:11 -0400 |
commit | ab3e000fdefa15404bf0a25dee375e684b02eb00 (patch) | |
tree | ff4dd9e2c5b6bd264b96e273497d781992c2e5e0 /sys | |
parent | 920dbd04588d869f0c2148a1be356533bfb3ce4c (diff) |
kernel: vm_map: Fix deadlock
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/vm_map.c | 2 |
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; |