summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2014-02-01 18:28:36 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2014-02-01 18:28:36 +0000
commit436717be5f892d6881d4cc83cd8a4965e5f0d9fc (patch)
tree132ee3d466d0e835202cf0892618ed535f214390
parenta7c1d4aaba6cd3f4db6194949e6a8a54b49c2c1c (diff)
downloadillumos-joyent-436717be5f892d6881d4cc83cd8a4965e5f0d9fc.tar.gz
OS-2750 kstat_install()/header_kstat_snapshot() race induces panic
-rw-r--r--usr/src/uts/common/os/kstat_fr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/src/uts/common/os/kstat_fr.c b/usr/src/uts/common/os/kstat_fr.c
index 7cd75fa8a6..a9f2e8eede 100644
--- a/usr/src/uts/common/os/kstat_fr.c
+++ b/usr/src/uts/common/os/kstat_fr.c
@@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2013, Joyent, Inc. All rights reserved.
+ * Copyright 2014, Joyent, Inc. All rights reserved.
*/
/*
@@ -1208,7 +1208,9 @@ kstat_install(kstat_t *ksp)
/*
* Now that the kstat is active, make it visible to the kstat driver.
*/
+ mutex_enter(&kstat_chain_lock);
ksp->ks_flags &= ~KSTAT_FLAG_INVALID;
+ mutex_exit(&kstat_chain_lock);
kstat_rele(ksp);
}