summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/os/zone.c
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2016-02-26 23:43:59 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2016-02-26 23:43:59 +0000
commite5490f12d073ec144d62bc50456b750256cc7c0a (patch)
treeda21320ee86b6b7bda553efb66b081c08948c201 /usr/src/uts/common/os/zone.c
parentd853ba795fd6d402efda9000401d1264245e760a (diff)
downloadillumos-joyent-e5490f12d073ec144d62bc50456b750256cc7c0a.tar.gz
OS-5189 lx dev enumeration can deadlock with zfs
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Diffstat (limited to 'usr/src/uts/common/os/zone.c')
-rw-r--r--usr/src/uts/common/os/zone.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr/src/uts/common/os/zone.c b/usr/src/uts/common/os/zone.c
index 33406eccc6..b1df79d006 100644
--- a/usr/src/uts/common/os/zone.c
+++ b/usr/src/uts/common/os/zone.c
@@ -2899,9 +2899,14 @@ zone_set_brand(zone_t *zone, const char *brand)
return (EINVAL);
}
- /* set up the brand specific data */
+ /*
+ * Set up the brand specific data.
+ * Note that it's possible that the hook has to drop the
+ * zone_status_lock and reaquire it before returning so we can't
+ * assume the lock has been held the entire time.
+ */
zone->zone_brand = bp;
- ZBROP(zone)->b_init_brand_data(zone);
+ ZBROP(zone)->b_init_brand_data(zone, &zone_status_lock);
mutex_exit(&zone_status_lock);
return (0);