diff options
author | alc <alc@FreeBSD.org> | 2002-12-18 20:16:22 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-12-18 20:16:22 +0000 |
commit | b7fb41d2f95b3bb13498689914be61d3d4d0e550 (patch) | |
tree | 2b6554bfbb91c9cafd36f459ea3345952fa8b112 /sys/kern | |
parent | 761d063e808061f78a2bd10e65cc88ff442124c6 (diff) | |
download | FreeBSD-src-b7fb41d2f95b3bb13498689914be61d3d4d0e550.zip FreeBSD-src-b7fb41d2f95b3bb13498689914be61d3d4d0e550.tar.gz |
Hold the page queues lock when performing vm_page_busy().
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_exec.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_subr.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 6005ea0..58c0f82 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -758,7 +758,9 @@ exec_map_first_page(imgp) break; if (ma[i]->valid) break; + vm_page_lock_queues(); vm_page_busy(ma[i]); + vm_page_unlock_queues(); } else { ma[i] = vm_page_alloc(object, i, VM_ALLOC_NORMAL); diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c index 2df1a13..07708fc 100644 --- a/sys/kern/kern_subr.c +++ b/sys/kern/kern_subr.c @@ -125,7 +125,9 @@ vm_pgmoveco(mapa, srcobj, kaddr, uaddr) panic("vm_pgmoveco: renaming busy page"); } kpindex = kern_pg->pindex; + vm_page_lock_queues(); vm_page_busy(kern_pg); + vm_page_unlock_queues(); vm_page_rename(kern_pg, uobject, upindex); vm_page_flag_clear(kern_pg, PG_BUSY); kern_pg->valid = VM_PAGE_BITS_ALL; |