diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2017-06-08 10:10:29 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2017-06-08 10:10:29 +0000 |
commit | 8cb9f5acecaded019a9a55454a31dcf4328d0d1b (patch) | |
tree | 7c69e28b9b9b5ac2d9f928324a663becf2efa2d7 /usr/src/lib | |
parent | 3a5445f1b9d90e4f1538503bd60913c8f302c17f (diff) | |
parent | 79809f9cf402f130667349b2d4007ecd65d63c6f (diff) | |
download | illumos-joyent-release-20170608.tar.gz |
[illumos-gate merge]release-20170608
commit 79809f9cf402f130667349b2d4007ecd65d63c6f
8269 dtrace stddev aggregation is normalized incorrectly
commit 22c8b9583d07895c16549075a53668d7bc988cf3
8108 zdb -l fails to read labels 2 and 3
commit 0255edcc85fc0cd1dda0e49bcd52eb66c06a1b16
8056 zfs send size estimate is inaccurate for some zvols
commit dbfd9f930004c390a2ce2cf850c71b4f880eef9c
8156 dbuf_evict_notify() does not need dbuf_evict_lock
commit 690031d326342fa4ea28b5e80f1ad6a16281519d
8168 NULL pointer dereference in zfs_create()
commit 7c4ab494ff60bbbcc0889e71388ae63e903bbf57
8276 rpcbind leaks memory due to libumem per thread caching.
commit f176a0a4cd61cbd708a7f25dc30d221f4d5902ba
8270 dnlc_reverse_lookup() is unsafe at any speed
commit 72d3dbb9ab4481606cb93caca98ba3b3a8eb6ce2
8300 fix man page issues found by mandoc 1.14.1
commit cb4d790db8fe85bce9f9647fe4e1bdc274c7af1c
8337 gss: misleading-indentation
commit f53522305c07915a44e86f2455cc62e7aac27037
8324 more: misleading-indentation
Conflicts:
usr/src/uts/common/fs/lookup.c
usr/src/man/man3c/thrd_equal.3c
Diffstat (limited to 'usr/src/lib')
-rw-r--r-- | usr/src/lib/libc/port/threads/thr.c | 8 | ||||
-rw-r--r-- | usr/src/lib/libdtrace/common/dt_consume.c | 2 | ||||
-rw-r--r-- | usr/src/lib/libzfs/common/libzfs_dataset.c | 4 |
3 files changed, 12 insertions, 2 deletions
diff --git a/usr/src/lib/libc/port/threads/thr.c b/usr/src/lib/libc/port/threads/thr.c index 134c078a57..747e789442 100644 --- a/usr/src/lib/libc/port/threads/thr.c +++ b/usr/src/lib/libc/port/threads/thr.c @@ -22,6 +22,7 @@ /* * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016 by Delphix. All rights reserved. + * Copyright (c) 2017 by The MathWorks, Inc. All rights reserved. */ /* * Copyright 2016 Joyent, Inc. @@ -779,9 +780,14 @@ _thrp_exit() } lmutex_unlock(&udp->link_lock); - tmem_exit(); /* deallocate tmem allocations */ + /* + * tsd_exit() may call its destructor free(), thus depending on + * tmem, therefore tmem_exit() needs to be called after tsd_exit() + * and tls_exit(). + */ tsd_exit(); /* deallocate thread-specific data */ tls_exit(); /* deallocate thread-local storage */ + tmem_exit(); /* deallocate tmem allocations */ heldlock_exit(); /* deal with left-over held locks */ /* block all signals to finish exiting */ diff --git a/usr/src/lib/libdtrace/common/dt_consume.c b/usr/src/lib/libdtrace/common/dt_consume.c index b292b6abc5..7f8c673dbe 100644 --- a/usr/src/lib/libdtrace/common/dt_consume.c +++ b/usr/src/lib/libdtrace/common/dt_consume.c @@ -381,8 +381,10 @@ dt_stddev(uint64_t *data, uint64_t normal) * The standard approximation for standard deviation is * sqrt(average(x**2) - average(x)**2), i.e. the square root * of the average of the squares minus the square of the average. + * When normalizing, we should divide the sum of x**2 by normal**2. */ dt_divide_128(data + 2, normal, avg_of_squares); + dt_divide_128(avg_of_squares, normal, avg_of_squares); dt_divide_128(avg_of_squares, data[0], avg_of_squares); norm_avg = (int64_t)data[1] / (int64_t)normal / (int64_t)data[0]; diff --git a/usr/src/lib/libzfs/common/libzfs_dataset.c b/usr/src/lib/libzfs/common/libzfs_dataset.c index 8f56c4042b..339be4e0af 100644 --- a/usr/src/lib/libzfs/common/libzfs_dataset.c +++ b/usr/src/lib/libzfs/common/libzfs_dataset.c @@ -3291,6 +3291,7 @@ zfs_create(libzfs_handle_t *hdl, const char *path, zfs_type_t type, char errbuf[1024]; uint64_t zoned; enum lzc_dataset_type ost; + zpool_handle_t *zpool_handle; (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, "cannot create '%s'"), path); @@ -3330,7 +3331,8 @@ zfs_create(libzfs_handle_t *hdl, const char *path, zfs_type_t type, if (p != NULL) *p = '\0'; - zpool_handle_t *zpool_handle = zpool_open(hdl, pool_path); + if ((zpool_handle = zpool_open(hdl, pool_path)) == NULL) + return (-1); if (props && (props = zfs_valid_proplist(hdl, type, props, zoned, NULL, zpool_handle, errbuf)) == 0) { |