Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern pool_{cache_}get: improve previous diagnostic by ch...
details: https://anonhg.NetBSD.org/src/rev/1b3169ec62ef
branches: trunk
changeset: 754772:1b3169ec62ef
user: rmind <rmind%NetBSD.org@localhost>
date: Wed May 12 08:11:16 2010 +0000
description:
pool_{cache_}get: improve previous diagnostic by checking for panicstr,
so it wont trigger the assert while trying to dump core on crash.
diffstat:
sys/kern/subr_pool.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r 905ae73d170e -r 1b3169ec62ef sys/kern/subr_pool.c
--- a/sys/kern/subr_pool.c Wed May 12 06:11:31 2010 +0000
+++ b/sys/kern/subr_pool.c Wed May 12 08:11:16 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_pool.c,v 1.184 2010/05/12 03:43:46 rmind Exp $ */
+/* $NetBSD: subr_pool.c,v 1.185 2010/05/12 08:11:16 rmind Exp $ */
/*-
* Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.184 2010/05/12 03:43:46 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.185 2010/05/12 08:11:16 rmind Exp $");
#include "opt_ddb.h"
#include "opt_pool.h"
@@ -992,7 +992,8 @@
if (pp->pr_itemsperpage == 0)
panic("pool_get: pool '%s': pr_itemsperpage is zero, "
"pool not initialized?", pp->pr_wchan);
- if ((cpu_intr_p() || cpu_softintr_p()) && pp->pr_ipl == IPL_NONE)
+ if ((cpu_intr_p() || cpu_softintr_p()) && pp->pr_ipl == IPL_NONE &&
+ !cold && panicstr == NULL)
panic("pool '%s' is IPL_NONE, but called from "
"interrupt context\n", pp->pr_wchan);
#endif
@@ -2529,7 +2530,7 @@
int s;
KASSERTMSG((!cpu_intr_p() && !cpu_softintr_p()) ||
- (pc->pc_pool.pr_ipl != IPL_NONE || cold),
+ (pc->pc_pool.pr_ipl != IPL_NONE || cold || panicstr != NULL),
("pool '%s' is IPL_NONE, but called from interrupt context\n",
pc->pc_pool.pr_wchan));
Home |
Main Index |
Thread Index |
Old Index