summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-01-15 09:35:58 +0000
committerdg <dg@FreeBSD.org>1995-01-15 09:35:58 +0000
commit5a3650b9788d36a0ff1867d5e7d5560a16ce435e (patch)
tree2ca19199f2c1f1fd7e7b98a0ca16398a950eee72
parent915accf24fa1f350c3b8f14bd2709211341861ac (diff)
downloadFreeBSD-src-5a3650b9788d36a0ff1867d5e7d5560a16ce435e.zip
FreeBSD-src-5a3650b9788d36a0ff1867d5e7d5560a16ce435e.tar.gz
Attempt to close a hole using splhigh/splx. There still appears to be a
serious one in the same area that I don't have time to fix.
-rw-r--r--sys/kern/vfs_bio.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index b847c81..8867fbe 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -18,7 +18,7 @@
* 5. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: vfs_bio.c,v 1.19 1995/01/10 09:20:34 davidg Exp $
+ * $Id: vfs_bio.c,v 1.20 1995/01/11 01:53:18 davidg Exp $
*/
/*
@@ -1108,8 +1108,10 @@ allocbuf(struct buf * bp, int size, int vmio)
vm_page_activate(m);
continue;
}
+ s = splhigh();
m = vm_page_lookup(obj, objoff);
if (!m) {
+ splx(s);
m = vm_page_alloc(obj, objoff, 0);
if (!m) {
int j;
@@ -1139,6 +1141,7 @@ allocbuf(struct buf * bp, int size, int vmio)
int j;
int bufferdestroyed = 0;
+ splx(s);
for (j = bp->b_npages; j < pageindex; j++) {
vm_page_t mt = bp->b_pages[j];
@@ -1172,6 +1175,7 @@ allocbuf(struct buf * bp, int size, int vmio)
(cnt.v_free_count + cnt.v_cache_count) < cnt.v_free_reserved) {
int j;
+ splx(s);
for (j = bp->b_npages; j < pageindex; j++) {
vm_page_t mt = bp->b_pages[j];
@@ -1200,6 +1204,7 @@ allocbuf(struct buf * bp, int size, int vmio)
if ((m->flags & PG_ACTIVE) == 0)
vm_page_activate(m);
m->flags |= PG_BUSY;
+ splx(s);
}
bp->b_pages[pageindex] = m;
curbpnpages = pageindex + 1;
OpenPOWER on IntegriCloud