Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern In _pool_put(), panic if we're put'ing with nout ==...
details: https://anonhg.NetBSD.org/src/rev/f1cc98bf769b
branches: trunk
changeset: 475878:f1cc98bf769b
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sun Aug 29 00:26:01 1999 +0000
description:
In _pool_put(), panic if we're put'ing with nout == 0. This will help us
detect a little earlier if we've dup-put'd. Otherwise, underflow occurs,
and subsequent allocations simply hang or fail (it thinks the hardlimit
has been reached).
diffstat:
sys/kern/subr_pool.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diffs (24 lines):
diff -r 97c52401323f -r f1cc98bf769b sys/kern/subr_pool.c
--- a/sys/kern/subr_pool.c Sat Aug 28 22:28:35 1999 +0000
+++ b/sys/kern/subr_pool.c Sun Aug 29 00:26:01 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_pool.c,v 1.29 1999/08/05 04:00:04 sommerfeld Exp $ */
+/* $NetBSD: subr_pool.c,v 1.30 1999/08/29 00:26:01 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1999 The NetBSD Foundation, Inc.
@@ -831,6 +831,14 @@
simple_lock(&pp->pr_slock);
pr_enter(pp, file, line);
+#ifdef DIAGNOSTIC
+ if (pp->pr_nout == 0) {
+ printf("pool %s: putting with none out\n",
+ pp->pr_wchan);
+ panic("pool_put");
+ }
+#endif
+
pr_log(pp, v, PRLOG_PUT, file, line);
if ((ph = pr_find_pagehead(pp, page)) == NULL) {
Home |
Main Index |
Thread Index |
Old Index