]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: tasks: Keep the TASK_RUNNING flag until queued
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 7 May 2026 11:14:16 +0000 (13:14 +0200)
committerOlivier Houchard <cognet@ci0.org>
Mon, 11 May 2026 14:17:40 +0000 (16:17 +0200)
commit82d723dd8e7f6b260fc980949161b1d2ec7bad11
tree6358601ea464cbc800d94c6608005036a011039e
parentaa2c7034e1a3303a2ba34fe750e65047f39f1988
BUG/MEDIUM: tasks: Keep the TASK_RUNNING flag until queued

In task_schedule(), it is not enough to get the TASK_RUNNING flag before
setting the expire field, we also have to keep it while queueing the
taks, otherwise the task may run in the meanwhile and set expire to 0,
triggering the BUG_ON() in __task_queue() again. So now, only drop the
running flag once it's done.

This should be backported up to 2.8.
include/haproxy/task.h