diff options
author | Robert Mustacchi <rm@joyent.com> | 2016-03-31 20:37:06 +0000 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2016-03-31 20:55:29 +0000 |
commit | fc2fcc9ced5a0410bce7ac5c974c9405d450a6bc (patch) | |
tree | ddecc8e9a8d0efd471959e083b251e4abc39bc15 /usr/src/lib/varpd | |
parent | 7a9d5986542a11af83d1f8720eb73ccf31fbf5df (diff) | |
download | illumos-joyent-fc2fcc9ced5a0410bce7ac5c974c9405d450a6bc.tar.gz |
OS-5299 varpd direct plugin doesn't properly restore its mutex
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Diffstat (limited to 'usr/src/lib/varpd')
-rw-r--r-- | usr/src/lib/varpd/direct/common/libvarpd_direct.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/src/lib/varpd/direct/common/libvarpd_direct.c b/usr/src/lib/varpd/direct/common/libvarpd_direct.c index 1262172178..018cdf641c 100644 --- a/usr/src/lib/varpd/direct/common/libvarpd_direct.c +++ b/usr/src/lib/varpd/direct/common/libvarpd_direct.c @@ -10,7 +10,7 @@ */ /* - * Copyright 2015, Joyent, Inc. + * Copyright 2016 Joyent, Inc. */ /* @@ -326,7 +326,8 @@ varpd_direct_restore(nvlist_t *nvp, varpd_provider_handle_t *hdl, if (vdp == NULL) return (ENOMEM); - if ((ret = mutex_init(&vdp->vad_lock, USYNC_THREAD, NULL)) != 0) { + if ((ret = mutex_init(&vdp->vad_lock, USYNC_THREAD | LOCK_ERRORCHECK, + NULL)) != 0) { umem_free(vdp, sizeof (varpd_direct_t)); return (ret); } |