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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/devid_cache.c
          +++ new/usr/src/uts/common/os/devid_cache.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
       23 + * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
  23   24   */
  24   25  
  25   26  #include <sys/note.h>
  26   27  #include <sys/t_lock.h>
  27   28  #include <sys/cmn_err.h>
  28   29  #include <sys/instance.h>
  29   30  #include <sys/conf.h>
  30   31  #include <sys/stat.h>
  31   32  #include <sys/ddi.h>
  32   33  #include <sys/hwconf.h>
↓ open down ↓ 695 lines elided ↑ open up ↑
 728  729          char            *minor_name,
 729  730          int             ndevts_alloced,
 730  731          int             *devtcntp,
 731  732          dev_t           *devtsp)
 732  733  {
 733  734          int                     circ;
 734  735          struct ddi_minor_data   *dmdp;
 735  736          int                     minor_all = 0;
 736  737          int                     ndevts = *devtcntp;
 737  738  
 738      -        ASSERT(i_ddi_devi_attached(dip));
      739 +        if (!i_ddi_devi_attached(dip)) {
      740 +                return;
      741 +        }
 739  742  
 740  743          /* are we looking for a set of minor nodes? */
 741  744          if ((minor_name == DEVID_MINOR_NAME_ALL) ||
 742  745              (minor_name == DEVID_MINOR_NAME_ALL_CHR) ||
 743  746              (minor_name == DEVID_MINOR_NAME_ALL_BLK))
 744  747                  minor_all = 1;
 745  748  
 746  749          /* Find matching minor names */
 747  750          ndi_devi_enter(dip, &circ);
 748  751          for (dmdp = DEVI(dip)->devi_minor; dmdp; dmdp = dmdp->next) {
↓ open down ↓ 422 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX