mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-19 04:00:46 +00:00
BUG/MEDIUM: tasks: Use the MT macros in tasklet_free().
In tasklet_free(), to attempt to remove ourself, use MT_LIST_DEL, we can't just use LIST_DEL(), as we theorically could be in the shared tasklet list. This should be backported to 2.1.
This commit is contained in:
parent
48726b78e5
commit
3c4f40acbf
@ -397,10 +397,8 @@ static inline void task_destroy(struct task *t)
|
||||
/* Should only be called by the thread responsible for the tasklet */
|
||||
static inline void tasklet_free(struct tasklet *tl)
|
||||
{
|
||||
if (!LIST_ISEMPTY(&tl->list)) {
|
||||
LIST_DEL(&tl->list);
|
||||
if (MT_LIST_DEL((struct mt_list *)&tl->list))
|
||||
_HA_ATOMIC_SUB(&tasks_run_queue, 1);
|
||||
}
|
||||
|
||||
pool_free(pool_head_tasklet, tl);
|
||||
if (unlikely(stopping))
|
||||
|
Loading…
Reference in New Issue
Block a user