summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_autoconf.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2008-07-21 20:50:49 +0000
committerrwatson <rwatson@FreeBSD.org>2008-07-21 20:50:49 +0000
commitf3c6f1e959a07e2bcb8f0ed9f00fc8dc13cc76c2 (patch)
tree4622537664d19aa289a041265081fb6b96777f6d /sys/kern/subr_autoconf.c
parentd42754352a2ac7a662a6e4b465ca9ec6b86383e5 (diff)
downloadFreeBSD-src-f3c6f1e959a07e2bcb8f0ed9f00fc8dc13cc76c2.zip
FreeBSD-src-f3c6f1e959a07e2bcb8f0ed9f00fc8dc13cc76c2.tar.gz
If run_interrupt_driven_config_hooks() waits 360 seconds and INVARIANTS
is compiled into the kernel, then panic. MFC after: 3 days Discussed with: scottl
Diffstat (limited to 'sys/kern/subr_autoconf.c')
-rw-r--r--sys/kern/subr_autoconf.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/sys/kern/subr_autoconf.c b/sys/kern/subr_autoconf.c
index 3e317ad..75a97b2 100644
--- a/sys/kern/subr_autoconf.c
+++ b/sys/kern/subr_autoconf.c
@@ -73,16 +73,21 @@ run_interrupt_driven_config_hooks_warning(int warned)
char namebuf[64];
long offset;
- printf("run_interrupt_driven_hooks: still waiting after %d seconds "
- "for", warned * WARNING_INTERVAL_SECS);
- TAILQ_FOREACH(hook_entry, &intr_config_hook_list, ich_links) {
- if (linker_search_symbol_name((caddr_t)hook_entry->ich_func,
- namebuf, sizeof(namebuf), &offset) == 0)
- printf(" %s", namebuf);
- else
- printf(" %p", hook_entry->ich_func);
+ if (warned < 6) {
+ printf("run_interrupt_driven_hooks: still waiting after %d "
+ "seconds for", warned * WARNING_INTERVAL_SECS);
+ TAILQ_FOREACH(hook_entry, &intr_config_hook_list, ich_links) {
+ if (linker_search_symbol_name(
+ (caddr_t)hook_entry->ich_func, namebuf,
+ sizeof(namebuf), &offset) == 0)
+ printf(" %s", namebuf);
+ else
+ printf(" %p", hook_entry->ich_func);
+ }
+ printf("\n");
}
- printf("\n");
+ KASSERT(warned < 6,
+ ("run_interrupt_driven_config_hooks: waited too long"));
}
static void
@@ -104,7 +109,7 @@ run_interrupt_driven_config_hooks(dummy)
while (!TAILQ_EMPTY(&intr_config_hook_list)) {
if (msleep(&intr_config_hook_list, &intr_config_hook_lock,
PCONFIG, "conifhk", WARNING_INTERVAL_SECS * hz) ==
- EWOULDBLOCK && warned < 5) {
+ EWOULDBLOCK) {
mtx_unlock(&intr_config_hook_lock);
warned++;
run_interrupt_driven_config_hooks_warning(warned);
OpenPOWER on IntegriCloud