Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Add a DIAGNOSTIC check to detect un-initialized pools.
details: https://anonhg.NetBSD.org/src/rev/804008e5a52f
branches: trunk
changeset: 566761:804008e5a52f
user: atatat <atatat%NetBSD.org@localhost>
date: Thu May 20 05:08:29 2004 +0000
description:
Add a DIAGNOSTIC check to detect un-initialized pools.
diffstat:
sys/kern/subr_pool.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 83129b718e4e -r 804008e5a52f sys/kern/subr_pool.c
--- a/sys/kern/subr_pool.c Thu May 20 03:26:26 2004 +0000
+++ b/sys/kern/subr_pool.c Thu May 20 05:08:29 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_pool.c,v 1.94 2004/04/25 16:42:41 simonb Exp $ */
+/* $NetBSD: subr_pool.c,v 1.95 2004/05/20 05:08:29 atatat Exp $ */
/*-
* Copyright (c) 1997, 1999, 2000 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.94 2004/04/25 16:42:41 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.95 2004/05/20 05:08:29 atatat Exp $");
#include "opt_pool.h"
#include "opt_poollog.h"
@@ -670,6 +670,9 @@
void *v;
#ifdef DIAGNOSTIC
+ if (__predict_false(pp->pr_itemsperpage == 0))
+ panic("pool_get: pool %p: pr_itemsperpage is zero, "
+ "pool not initialized?", pp);
if (__predict_false(curlwp == NULL && doing_shutdown == 0 &&
(flags & PR_WAITOK) != 0))
panic("pool_get: %s: must have NOWAIT", pp->pr_wchan);
Home |
Main Index |
Thread Index |
Old Index