summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/pmap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index b41dfb0..b7c0d0f 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -816,19 +816,25 @@ pmap_new_proc(p)
/*
* allocate object for the upages
*/
+ PROC_LOCK(p);
if ((upobj = p->p_upages_obj) == NULL) {
+ PROC_UNLOCK(p);
upobj = vm_object_allocate( OBJT_DEFAULT, UPAGES);
+ PROC_LOCK(p);
p->p_upages_obj = upobj;
}
/* get a kernel virtual address for the UPAGES for this proc */
if ((up = p->p_addr) == NULL) {
+ PROC_UNLOCK(p);
up = (struct user *) kmem_alloc_nofault(kernel_map,
UPAGES * PAGE_SIZE);
if (up == NULL)
panic("pmap_new_proc: u_map allocation failed");
+ PROC_LOCK(p);
p->p_addr = up;
}
+ PROC_UNLOCK(p);
ptek = (unsigned *) vtopte((vm_offset_t) up);
OpenPOWER on IntegriCloud