From 94101b5208bccb137684bbed31583b6989f976d8 Mon Sep 17 00:00:00 2001 From: David Greenman Date: Sun, 18 Dec 1994 14:16:22 +0000 Subject: [PATCH] Move page_unhold's in pmap_object_init_pt down one line to gard against a potential race condition. --- sys/amd64/amd64/pmap.c | 6 +++--- sys/i386/i386/pmap.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 0dcb9f4426c7..22cec02726c1 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -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); } } } diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 0dcb9f4426c7..22cec02726c1 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -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); } } }