MINOR: tasklets: Don't attempt to add a tasklet in the list twice.

Don't try to add a tasklet to the run queue if it's already in there, or we
might get an infinite loop.
This commit is contained in:
Olivier Houchard 2018-07-17 18:29:22 +02:00 committed by Willy Tarreau
parent 23d465c48c
commit e17c2d3e57

View File

@ -205,6 +205,8 @@ static inline struct task *task_unlink_rq(struct task *t)
static inline void tasklet_wakeup(struct tasklet *tl)
{
if (!LIST_ISEMPTY(&tl->list))
return;
LIST_ADDQ(&task_list[tid], &tl->list);
task_list_size[tid]++;
HA_ATOMIC_ADD(&tasks_run_queue, 1);