Print this page
OS-68 cfgadm can cause kernel panic when trying to configure a retired device
        
*** 19,28 ****
--- 19,29 ----
   * CDDL HEADER END
   */
  
  /*
   * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
+  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
   * Copyright 2014 Garrett D'Amore <garrett@damore.org>
   * Copyright (c) 2016 by Delphix. All rights reserved.
   */
  
  #include <sys/note.h>
*** 3098,3107 ****
--- 3099,3113 ----
  
          self = e_ddi_hold_devi_by_dev(dev, 0);
          if (self == NULL) {
                  rv = ENXIO;
                  goto out;
+         }
+ 
+         if (DEVI(self)->devi_flags & (DEVI_RETIRED | DEVI_RETIRING)) {
+                 rv = ENXIO;
+                 goto out;
          }
  
          tran = ddi_get_driver_private(self);
          if (tran == NULL) {
                  rv = ENXIO;