summaryrefslogtreecommitdiff
path: root/sys/kern/subr_pool.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2013-06-05 00:44:07 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2013-06-05 00:44:07 +0000
commitc4be97857c5dbdbdd5181530fb472314f8bf3c0e (patch)
tree244b6fa0c40fb83433f9413f7aea1d4ba6cdfe98 /sys/kern/subr_pool.c
parentd52586981e6a561528224c52b5775fcbbf5c6a45 (diff)
blow up sooner rather than later for double pool_put
ok deraadt
Diffstat (limited to 'sys/kern/subr_pool.c')
-rw-r--r--sys/kern/subr_pool.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/subr_pool.c b/sys/kern/subr_pool.c
index ddaab3988d5..e2dc2a798ec 100644
--- a/sys/kern/subr_pool.c
+++ b/sys/kern/subr_pool.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_pool.c,v 1.121 2013/05/31 20:44:10 tedu Exp $ */
+/* $OpenBSD: subr_pool.c,v 1.122 2013/06/05 00:44:06 tedu Exp $ */
/* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */
/*-
@@ -780,6 +780,12 @@ pool_do_put(struct pool *pp, void *v)
* Return to item list.
*/
#ifdef DIAGNOSTIC
+ if (pool_debug) {
+ struct pool_item *qi;
+ XSIMPLEQ_FOREACH(qi, &ph->ph_itemlist, pi_list)
+ if (pi == qi)
+ panic("double pool_put: %p", pi);
+ }
pi->pi_magic = poison_value(pi);
if (ph->ph_magic) {
poison_mem(pi + 1, pp->pr_size - sizeof(*pi));