diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-11-10 03:56:17 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-11-10 03:56:17 +0000 |
commit | ce8919e4d085d3f90fc7037adb6f792b1a2b284c (patch) | |
tree | 629c4caa82d17d18b83309209c0ce2c41ac4d90a /sys/uvm/uvm_mmap.c | |
parent | 6a814f32b6f5a12b2709efe7eb472f82e8b082cc (diff) |
vm_map_lock() around calls to uvm_map_findspace(); ok tedu
Diffstat (limited to 'sys/uvm/uvm_mmap.c')
-rw-r--r-- | sys/uvm/uvm_mmap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c index 54abd240713..b409c5a3ab0 100644 --- a/sys/uvm/uvm_mmap.c +++ b/sys/uvm/uvm_mmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_mmap.c,v 1.70 2007/09/01 15:14:44 martin Exp $ */ +/* $OpenBSD: uvm_mmap.c,v 1.71 2008/11/10 03:56:16 deraadt Exp $ */ /* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */ /* @@ -205,8 +205,9 @@ sys_mquery(p, v, retval) } vaddr = round_page((vaddr_t)p->p_vmspace->vm_daddr + MAXDSIZ); } -again: + vm_map_lock(&p->p_vmspace->vm_map); +again: if (uvm_map_findspace(&p->p_vmspace->vm_map, vaddr, size, &vaddr, uobj, uoff, 0, flags) == NULL) { if (flags & UVM_FLAG_FIXED) @@ -224,6 +225,7 @@ again: error = 0; *retval = (register_t)(vaddr); } + vm_map_unlock(&p->p_vmspace->vm_map); done: if (fp != NULL) FRELE(fp); |