Print this page
OS-122 Assertion in e_devid_minor_to_devlist() in devid_cache.c

@@ -18,10 +18,11 @@
  *
  * CDDL HEADER END
  */
 /*
  * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
  */
 
 #include <sys/note.h>
 #include <sys/t_lock.h>
 #include <sys/cmn_err.h>

@@ -733,11 +734,13 @@
         int                     circ;
         struct ddi_minor_data   *dmdp;
         int                     minor_all = 0;
         int                     ndevts = *devtcntp;
 
-        ASSERT(i_ddi_devi_attached(dip));
+        if (!i_ddi_devi_attached(dip)) {
+                return;
+        }
 
         /* are we looking for a set of minor nodes? */
         if ((minor_name == DEVID_MINOR_NAME_ALL) ||
             (minor_name == DEVID_MINOR_NAME_ALL_CHR) ||
             (minor_name == DEVID_MINOR_NAME_ALL_BLK))