svn commit: r305169 - head/sys/kern
Patrick Kelsey
pkelsey at FreeBSD.org
Thu Sep 1 02:05:47 UTC 2016
Author: pkelsey
Date: Thu Sep 1 02:05:46 2016
New Revision: 305169
URL: https://svnweb.freebsd.org/changeset/base/305169
Log:
_taskqueue_start_threads() now fails if it doesn't actually start any threads.
Reviewed by: jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D7701
Modified:
head/sys/kern/subr_taskqueue.c
Modified: head/sys/kern/subr_taskqueue.c
==============================================================================
--- head/sys/kern/subr_taskqueue.c Thu Sep 1 01:08:18 2016 (r305168)
+++ head/sys/kern/subr_taskqueue.c Thu Sep 1 02:05:46 2016 (r305169)
@@ -625,6 +625,11 @@ _taskqueue_start_threads(struct taskqueu
} else
tq->tq_tcount++;
}
+ if (tq->tq_tcount == 0) {
+ free(tq->tq_threads, M_TASKQUEUE);
+ tq->tq_threads = NULL;
+ return (ENOMEM);
+ }
for (i = 0; i < count; i++) {
if (tq->tq_threads[i] == NULL)
continue;
More information about the svn-src-all
mailing list