diff options
author | lh195018 <none@none> | 2008-02-21 22:26:00 -0800 |
---|---|---|
committer | lh195018 <none@none> | 2008-02-21 22:26:00 -0800 |
commit | bdb0fa453175b220dad117359624622021aad5b2 (patch) | |
tree | 88d39fb34185657ea69ebc4647b058243f6c7402 /usr/src | |
parent | 9d40d37485d577ef18631dc222cb3b42e8407e7e (diff) | |
download | illumos-gate-bdb0fa453175b220dad117359624622021aad5b2.tar.gz |
6648880 assertion failure in sd_unit_attach due to kstat_create failing
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/io/scsi/targets/sd.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/usr/src/uts/common/io/scsi/targets/sd.c b/usr/src/uts/common/io/scsi/targets/sd.c index b625de972c..ed3b139f92 100644 --- a/usr/src/uts/common/io/scsi/targets/sd.c +++ b/usr/src/uts/common/io/scsi/targets/sd.c @@ -6882,6 +6882,9 @@ sd_unit_attach(dev_info_t *devi) "sd_unit_attach: un:0x%p un_stats created\n", un); sd_create_errstats(un, instance); + if (un->un_errstats == NULL) { + goto create_errstats_failed; + } SD_TRACE(SD_LOG_ATTACH_DETACH, un, "sd_unit_attach: un:0x%p errstats created\n", un); @@ -7304,7 +7307,6 @@ sd_unit_attach(dev_info_t *devi) /* * Read and initialize the devid for the unit. */ - ASSERT(un->un_errstats != NULL); if (un->un_f_devid_supported) { sd_register_devid(un, devi, reservation_flag); } @@ -7517,15 +7519,18 @@ spinup_failed: * Partition stats apparently are not used with removables. These would * not have been created during attach, so no need to clean them up... */ - if (un->un_stats != NULL) { - kstat_delete(un->un_stats); - un->un_stats = NULL; - } if (un->un_errstats != NULL) { kstat_delete(un->un_errstats); un->un_errstats = NULL; } +create_errstats_failed: + + if (un->un_stats != NULL) { + kstat_delete(un->un_stats); + un->un_stats = NULL; + } + ddi_xbuf_attr_unregister_devinfo(un->un_xbuf_attr, devi); ddi_xbuf_attr_destroy(un->un_xbuf_attr); |