]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: tasks: Don't forget to decrement task_list_size in tasklet_free().
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 12 Sep 2018 12:55:03 +0000 (14:55 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 12 Sep 2018 15:37:55 +0000 (17:37 +0200)
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.

include/proto/task.h

index eef4ded436bf5b3d08e59ec6de9a8c43f4045b32..5445c99067a8e2980495f6c99ee7948d7a296ace 100644 (file)
@@ -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);