summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-12-02 01:12:05 +0000
committeralc <alc@FreeBSD.org>2002-12-02 01:12:05 +0000
commitd5387889cf085aef87f5ad40da8b3971385e2a1e (patch)
tree74a0532cbadf36d4b64116dd1d4125d8525716c4 /sys
parent86b5d0d658fdb5d01756833a7ddb09d0cd6757db (diff)
downloadFreeBSD-src-d5387889cf085aef87f5ad40da8b3971385e2a1e.zip
FreeBSD-src-d5387889cf085aef87f5ad40da8b3971385e2a1e.tar.gz
MFi386
Hold the page queues lock around vm_page_unhold() in vunmapbuf(). Approved by: re (blanket)
Diffstat (limited to 'sys')
-rw-r--r--sys/alpha/alpha/vm_machdep.c2
-rw-r--r--sys/ia64/ia64/vm_machdep.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/alpha/alpha/vm_machdep.c b/sys/alpha/alpha/vm_machdep.c
index 2f86438..09158d8 100644
--- a/sys/alpha/alpha/vm_machdep.c
+++ b/sys/alpha/alpha/vm_machdep.c
@@ -393,6 +393,7 @@ vunmapbuf(bp)
if ((bp->b_flags & B_PHYS) == 0)
panic("vunmapbuf");
+ vm_page_lock_queues();
for (addr = (caddr_t)trunc_page(bp->b_data);
addr < bp->b_data + bp->b_bufsize;
addr += PAGE_SIZE) {
@@ -400,6 +401,7 @@ vunmapbuf(bp)
pmap_kremove((vm_offset_t) addr);
vm_page_unhold(PHYS_TO_VM_PAGE(pa));
}
+ vm_page_unlock_queues();
bp->b_data = bp->b_saveaddr;
}
diff --git a/sys/ia64/ia64/vm_machdep.c b/sys/ia64/ia64/vm_machdep.c
index 7bfdd76..d4a8c64 100644
--- a/sys/ia64/ia64/vm_machdep.c
+++ b/sys/ia64/ia64/vm_machdep.c
@@ -406,6 +406,7 @@ vunmapbuf(bp)
if ((bp->b_flags & B_PHYS) == 0)
panic("vunmapbuf");
+ vm_page_lock_queues();
for (addr = (caddr_t)trunc_page(bp->b_data);
addr < bp->b_data + bp->b_bufsize;
addr += PAGE_SIZE) {
@@ -413,6 +414,7 @@ vunmapbuf(bp)
pmap_kremove((vm_offset_t) addr);
vm_page_unhold(PHYS_TO_VM_PAGE(pa));
}
+ vm_page_unlock_queues();
bp->b_data = bp->b_saveaddr;
}
OpenPOWER on IntegriCloud