diff options
author | 2014-09-28 10:03:05 +0000 | |
---|---|---|
committer | 2014-09-28 10:03:05 +0000 | |
commit | f2aa9532575926e96db769d3cc952aaf6b4457b6 (patch) | |
tree | b941f86a4bcc24816cc748407ff2e1b10ddc9bf8 /sys/kern/subr_pool.c | |
parent | I was mistaken: Nothing's wrong with contractions, they're just a normal (diff) | |
download | wireguard-openbsd-f2aa9532575926e96db769d3cc952aaf6b4457b6.tar.xz wireguard-openbsd-f2aa9532575926e96db769d3cc952aaf6b4457b6.zip |
in pool_destroy, enter and leave mutex as necessary to satisfy assertions.
ok dlg
Diffstat (limited to 'sys/kern/subr_pool.c')
-rw-r--r-- | sys/kern/subr_pool.c | 4 |
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)); |