summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2007-10-18 20:26:56 +0000
committerBob Beck <beck@cvs.openbsd.org>2007-10-18 20:26:56 +0000
commit4d3f8b77be103329c722bf0c1f8d5d6e7518a9a6 (patch)
tree811ddb346a74f8105fb23ebb37e87f75861548f1
parent1878a72966c54773e9b7f018cd9085841e6a96b7 (diff)
Correct possible spl problem in buffer cleaning daemon - the buffer cleaning
daemon requires splbio when doing dirty buffer queue manipulation. Since version 1.88 of vfs_bio.c, it was possible to break out of the processing loop when the cleaner had been running long enough, and this early exit would mean a future pass through would manipulate the buffer queues not at splbio. This change corrects this. ok krw@, deraadt@, tedu@, thib@
-rw-r--r--sys/kern/vfs_bio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index b40113a0844..fffb0a5db25 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_bio.c,v 1.100 2007/09/15 10:10:37 martin Exp $ */
+/* $OpenBSD: vfs_bio.c,v 1.101 2007/10/18 20:26:55 beck Exp $ */
/* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */
/*-
@@ -1122,10 +1122,10 @@ buf_daemon(struct proc *p)
/* Never allow processing to run for more than 1 sec */
getmicrouptime(&tv);
timersub(&tv, &starttime, &timediff);
+ s = splbio();
if (timediff.tv_sec)
break;
- s = splbio();
}
}
}