diff options
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_glue.c | 2 | ||||
-rw-r--r-- | sys/vm/vm_kern.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index 870bced..cf37e46 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -328,12 +328,14 @@ vm_proc_swapin(struct proc *p) } if (upobj->resident_page_count != UAREA_PAGES) panic("vm_proc_swapin: lost pages from upobj"); + vm_page_lock_queues(); TAILQ_FOREACH(m, &upobj->memq, listq) { m->valid = VM_PAGE_BITS_ALL; vm_page_wire(m); vm_page_wakeup(m); vm_page_flag_set(m, PG_MAPPED | PG_WRITEABLE); } + vm_page_unlock_queues(); up = (vm_offset_t)p->p_uarea; pmap_qenter(up, ma, UAREA_PAGES); } diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index c3a1312..2377355 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -419,8 +419,10 @@ retry: */ for (i = 0; i < size; i += PAGE_SIZE) { m = vm_page_lookup(kmem_object, OFF_TO_IDX(offset + i)); + vm_page_lock_queues(); vm_page_wire(m); vm_page_wakeup(m); + vm_page_unlock_queues(); /* * Because this is kernel_pmap, this call will not block. */ |