Move page_unhold's in pmap_object_init_pt down one line to gard against

a potential race condition.
This commit is contained in:
David Greenman 1994-12-18 14:16:22 +00:00
parent 4e32be0fb7
commit 94101b5208
2 changed files with 6 additions and 6 deletions

View File

@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
* $Id: pmap.c,v 1.37 1994/10/08 22:19:49 phk Exp $
* $Id: pmap.c,v 1.38 1994/12/18 03:36:27 davidg Exp $
*/
/*
@ -1480,8 +1480,8 @@ pmap_object_init_pt(pmap, addr, object, offset, size)
v = i386_trunc_page(((vm_offset_t)vtopte( addr+tmpoff)));
/* a fault might occur here */
*(volatile char *)v += 0;
vm_page_unhold(p);
anyvalid += pmap_enter_quick(pmap, addr+tmpoff, VM_PAGE_TO_PHYS(p));
vm_page_unhold(p);
}
p = p->listq.tqe_next;
objbytes -= NBPG;
@ -1498,8 +1498,8 @@ pmap_object_init_pt(pmap, addr, object, offset, size)
v = i386_trunc_page(((vm_offset_t)vtopte( addr+tmpoff)));
/* a fault might occur here */
*(volatile char *)v += 0;
vm_page_unhold(p);
anyvalid += pmap_enter_quick(pmap, addr+tmpoff, VM_PAGE_TO_PHYS(p));
vm_page_unhold(p);
}
}
}

View File

@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
* $Id: pmap.c,v 1.37 1994/10/08 22:19:49 phk Exp $
* $Id: pmap.c,v 1.38 1994/12/18 03:36:27 davidg Exp $
*/
/*
@ -1480,8 +1480,8 @@ pmap_object_init_pt(pmap, addr, object, offset, size)
v = i386_trunc_page(((vm_offset_t)vtopte( addr+tmpoff)));
/* a fault might occur here */
*(volatile char *)v += 0;
vm_page_unhold(p);
anyvalid += pmap_enter_quick(pmap, addr+tmpoff, VM_PAGE_TO_PHYS(p));
vm_page_unhold(p);
}
p = p->listq.tqe_next;
objbytes -= NBPG;
@ -1498,8 +1498,8 @@ pmap_object_init_pt(pmap, addr, object, offset, size)
v = i386_trunc_page(((vm_offset_t)vtopte( addr+tmpoff)));
/* a fault might occur here */
*(volatile char *)v += 0;
vm_page_unhold(p);
anyvalid += pmap_enter_quick(pmap, addr+tmpoff, VM_PAGE_TO_PHYS(p));
vm_page_unhold(p);
}
}
}