summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-09-28 10:03:06 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-09-28 10:03:06 +0000
commit6f52de09278160652893150f1262f24c834917aa (patch)
tree066fbf8ed208e185979d63441da200f9b02cd8c8 /sys/kern
parent1ac4ba95576c8517ff1fcf62f49af0291e20877e (diff)
in pool_destroy, enter and leave mutex as necessary to satisfy assertions.
ok dlg
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/subr_pool.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/subr_pool.c b/sys/kern/subr_pool.c
index 2f8c1366fcc..6f881e26295 100644
--- a/sys/kern/subr_pool.c
+++ b/sys/kern/subr_pool.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_pool.c,v 1.160 2014/09/26 05:43:14 dlg Exp $ */
+/* $OpenBSD: subr_pool.c,v 1.161 2014/09/28 10:03:05 tedu Exp $ */
/* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */
/*-
@@ -385,7 +385,9 @@ pool_destroy(struct pool *pp)
/* Remove all pages */
while ((ph = LIST_FIRST(&pp->pr_emptypages)) != NULL) {
+ mtx_enter(&pp->pr_mtx);
pool_p_remove(pp, ph);
+ mtx_leave(&pp->pr_mtx);
pool_p_free(pp, ph);
}
KASSERT(LIST_EMPTY(&pp->pr_fullpages));