Hold the page queues lock when performing vm_page_busy().

This commit is contained in:
Alan Cox 2002-12-18 20:16:22 +00:00
parent 88806cc28c
commit ee113343eb
2 changed files with 4 additions and 0 deletions

View File

@ -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);

View File

@ -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;