summaryrefslogtreecommitdiffstats
path: root/cddl
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2014-12-04 23:17:35 +0000
committerdelphij <delphij@FreeBSD.org>2014-12-04 23:17:35 +0000
commit0c96bfd67d736e0780c2a92fb19dca4e0b27111a (patch)
tree2ca78153ec762b2b1cad5910ed18da3cc5075d34 /cddl
parent0b08d45457dabf582a0497da956e987210f29b68 (diff)
downloadFreeBSD-src-0c96bfd67d736e0780c2a92fb19dca4e0b27111a.zip
FreeBSD-src-0c96bfd67d736e0780c2a92fb19dca4e0b27111a.tar.gz
MFC r274303:
Apply upstream 13597:3eac1e8e0f4c (git: illumos-gate@aa846ad9): Initialize tqent_flags in the userland taskq implementation. Without this the assertion of tq->tq_freelist != NULL may fail in taskq_destroy. The problem is that tqent_flags is never initialized in the userland implementation while the kernel one does initialize it. Without proper initialization, the flag may have its lowest bit set, making it treated as TQENT_FLAG_PREALLOC and never removing taskq_ent_t from tq_freelist.
Diffstat (limited to 'cddl')
-rw-r--r--cddl/contrib/opensolaris/lib/libzpool/common/taskq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c b/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c
index d4036d0..785f106 100644
--- a/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c
+++ b/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c
@@ -24,6 +24,7 @@
*/
/*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2012 Garrett D'Amore <garrett@damore.org>. All rights reserved.
*/
#include <sys/zfs_context.h>
@@ -136,6 +137,7 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t tqflags)
t->tqent_prev->tqent_next = t;
t->tqent_func = func;
t->tqent_arg = arg;
+ t->tqent_flags = 0;
cv_signal(&tq->tq_dispatch_cv);
mutex_exit(&tq->tq_lock);
return (1);
OpenPOWER on IntegriCloud