diff options
author | alc <alc@FreeBSD.org> | 2002-07-11 18:48:05 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-07-11 18:48:05 +0000 |
commit | 25fc8eccc6b7930136472f6a7ece543412e14b1a (patch) | |
tree | fdc9464a62a4a8868d5acde9bab980d864520748 /sys | |
parent | d553d8cff7f18955ac60df8e4c2072a5fa26c3d0 (diff) | |
download | FreeBSD-src-25fc8eccc6b7930136472f6a7ece543412e14b1a.zip FreeBSD-src-25fc8eccc6b7930136472f6a7ece543412e14b1a.tar.gz |
o Lock accesses to the page queues.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_exec.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 8682d62..39600fb 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -590,15 +590,18 @@ exec_map_first_page(imgp) if ((rv != VM_PAGER_OK) || (ma[0] == NULL) || (ma[0]->valid == 0)) { if (ma[0]) { + vm_page_lock_queues(); vm_page_protect(ma[0], VM_PROT_NONE); vm_page_free(ma[0]); + vm_page_unlock_queues(); } return EIO; } } - + vm_page_lock_queues(); vm_page_wire(ma[0]); vm_page_wakeup(ma[0]); + vm_page_unlock_queues(); pmap_qenter((vm_offset_t)imgp->image_header, ma, 1); imgp->firstpage = ma[0]; @@ -614,7 +617,9 @@ exec_unmap_first_page(imgp) if (imgp->firstpage) { pmap_qremove((vm_offset_t)imgp->image_header, 1); + vm_page_lock_queues(); vm_page_unwire(imgp->firstpage, 1); + vm_page_unlock_queues(); imgp->firstpage = NULL; } } |