diff options
| author | Peter Telford <Peter.Telford@Sun.COM> | 2010-06-24 01:30:17 -0700 |
|---|---|---|
| committer | Peter Telford <Peter.Telford@Sun.COM> | 2010-06-24 01:30:17 -0700 |
| commit | 6e00b11631a5f175b6ba51785a375a53af0bbe98 (patch) | |
| tree | 05648377c7dc4b40cc6c21e3ec68b37fa67f3768 /usr/src/uts | |
| parent | 7eb654901a0c61430e2e14ec341d6e5d5a20f714 (diff) | |
| download | illumos-joyent-6e00b11631a5f175b6ba51785a375a53af0bbe98.tar.gz | |
6923628 system panic with genunix:timeout_generic while booting up
Diffstat (limited to 'usr/src/uts')
| -rw-r--r-- | usr/src/uts/common/os/callout.c | 8 | ||||
| -rw-r--r-- | usr/src/uts/common/os/kmem.c | 8 |
2 files changed, 13 insertions, 3 deletions
diff --git a/usr/src/uts/common/os/callout.c b/usr/src/uts/common/os/callout.c index 23de83c0ca..6c2fbd071e 100644 --- a/usr/src/uts/common/os/callout.c +++ b/usr/src/uts/common/os/callout.c @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <sys/callo.h> @@ -37,6 +36,8 @@ #include <sys/sysmacros.h> #include <sys/sdt.h> +int callout_init_done; /* useful during boot */ + /* * Callout tables. See timeout(9F) for details. */ @@ -2190,4 +2191,7 @@ callout_init(void) callout_boot_ct = &callout_table[CALLOUT_TABLE(0, CPU->cpu_seqid)]; callout_cpu_online(CPU); mutex_exit(&cpu_lock); + + /* heads-up to boot-time clients that timeouts now available */ + callout_init_done = 1; } diff --git a/usr/src/uts/common/os/kmem.c b/usr/src/uts/common/os/kmem.c index c9f7313f56..56b67b3147 100644 --- a/usr/src/uts/common/os/kmem.c +++ b/usr/src/uts/common/os/kmem.c @@ -832,6 +832,7 @@ extern void streams_msg_init(void); extern int segkp_fromheap; extern void segkp_cache_free(void); +extern int callout_init_done; struct kmem_cache_kstat { kstat_named_t kmc_buf_size; @@ -3124,7 +3125,12 @@ kmem_reap_timeout(void *flag_arg) static void kmem_reap_done(void *flag) { - (void) timeout(kmem_reap_timeout, flag, kmem_reap_interval); + if (!callout_init_done) { + /* can't schedule a timeout at this point */ + kmem_reap_timeout(flag); + } else { + (void) timeout(kmem_reap_timeout, flag, kmem_reap_interval); + } } static void |
