mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 20:46:11 +02:00
MINOR: tasks/debug: add a BUG_ON() check to detect requeued task on free
__task_free() cannot be called with a task still in the queue. This test adds a check which confirms there is no concurrency issue on such a case where a thread could requeue nor wakeup a task being freed.
This commit is contained in:
parent
e5d79bccc0
commit
f2452b3c70
@ -473,6 +473,7 @@ static inline void __task_free(struct task *t)
|
||||
sched->current = NULL;
|
||||
__ha_barrier_store();
|
||||
}
|
||||
BUG_ON(task_in_wq(t) || task_in_rq(t));
|
||||
pool_free(pool_head_task, t);
|
||||
if (unlikely(stopping))
|
||||
pool_flush(pool_head_task);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user