usr/src/uts/common/os/zone.c
changeset 3671 48011e38989d
parent 3448 aaf16568054b
child 3792 57ba782523b7
--- a/usr/src/uts/common/os/zone.c	Fri Feb 16 15:04:43 2007 -0800
+++ b/usr/src/uts/common/os/zone.c	Fri Feb 16 15:39:38 2007 -0800
@@ -3777,7 +3777,11 @@
 		return (set_errno(EINTR));
 	}
 
-	brand_unregister_zone(zone->zone_brand);
+	/*
+	 * Zone can be become down/destroyable even if the above wait
+	 * returns EINTR, so any code added here may never execute.
+	 * (i.e. don't add code here)
+	 */
 
 	zone_rele(zone);
 	return (0);
@@ -3875,9 +3879,12 @@
 
 	}
 
-	/* Get rid of the zone's kstats */
+	/* Get rid of the zone's kstats. */
 	zone_kstat_delete(zone);
 
+	/* Say goodbye to brand framework. */
+	brand_unregister_zone(zone->zone_brand);
+
 	/*
 	 * It is now safe to let the zone be recreated; remove it from the
 	 * lists.  The memory will not be freed until the last cred