diff options
author | Garrett D'Amore <garrett@nexenta.com> | 2010-10-19 22:35:04 -0700 |
---|---|---|
committer | Garrett D'Amore <garrett@nexenta.com> | 2010-10-19 22:35:04 -0700 |
commit | a0d1cdd57e7eca57ed736ab2500ca85a4dcc8f78 (patch) | |
tree | dcd84eed02cc75c839831887923b5026870419b1 /usr/src | |
parent | fe89515e649436ba27844b63b5f18b41113d99c8 (diff) | |
download | illumos-gate-a0d1cdd57e7eca57ed736ab2500ca85a4dcc8f78.tar.gz |
349 hang during network boot (circular kcf dependency)
Reviewed by: richlowe@richlowe.net
Reviewed by: gwr@nexenta.com
Reviewed by: bryancantrill@nexenta.com
Approved by: gwr@nexenta.com
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/crypto/api/kcf_random.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/usr/src/uts/common/crypto/api/kcf_random.c b/usr/src/uts/common/crypto/api/kcf_random.c index ffb2c61e62..efaf5c37d1 100644 --- a/usr/src/uts/common/crypto/api/kcf_random.c +++ b/usr/src/uts/common/crypto/api/kcf_random.c @@ -834,13 +834,22 @@ rnd_alloc_magazines() } } +static void +rnd_mechid(void *notused) +{ + _NOTE(ARGUNUSED(notused)); + rngmech_type = crypto_mech2id(SUN_RANDOM); +} + void kcf_rnd_schedule_timeout(boolean_t do_mech2id) { clock_t ut; /* time in microseconds */ - if (do_mech2id) - rngmech_type = crypto_mech2id(SUN_RANDOM); + if (do_mech2id) { + /* This should never fail due to TQ_SLEEP. */ + (void) taskq_dispatch(system_taskq, rnd_mechid, NULL, TQ_SLEEP); + } /* * The new timeout value is taken from the buffer of random bytes. |