From: Olivier Houchard Date: Wed, 12 Sep 2018 12:55:03 +0000 (+0200) Subject: BUG/MEDIUM: tasks: Don't forget to decrement task_list_size in tasklet_free(). X-Git-Tag: v1.9-dev2~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=931624a00b44f3a885cc3ec443b87dce22132334;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: tasks: Don't forget to decrement task_list_size in tasklet_free(). In tasklet_free(), if we're currently in the runnable task list, don't forget to decrement taks_list_size, or it'll end up being to big, and we may not process tasks in the global runqueue. --- diff --git a/include/proto/task.h b/include/proto/task.h index eef4ded436..5445c99067 100644 --- a/include/proto/task.h +++ b/include/proto/task.h @@ -347,6 +347,8 @@ static inline void task_free(struct task *t) static inline void tasklet_free(struct tasklet *tl) { + if (!LIST_ISEMPTY(&tl->list)) + task_list_size[tid]--; LIST_DEL(&tl->list); pool_free(pool_head_tasklet, tl);