]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: tasks: Make sure we switch wait queues in task_set_affinity().
authorOlivier Houchard <cognet@ci0.org>
Thu, 5 Dec 2019 14:11:19 +0000 (15:11 +0100)
committerOlivier Houchard <cognet@ci0.org>
Thu, 5 Dec 2019 14:11:19 +0000 (15:11 +0100)
commit0742c314c35c2c96b72e42076c76d6a6786045ba
tree4c960e51295a2677cfa5102aeda86bf7f0724f42
parent2545a0b352ffb49e68e8945c9b8ce7e633d7e8b0
BUG/MEDIUM: tasks: Make sure we switch wait queues in task_set_affinity().

In task_set_affinity(), leave the wait_queue if any before changing the
affinity, and re-enter a wait queue once it is done. If we don't do that,
the task may stay in the wait queue of another thread, and we later may
end up modifying that wait queue while holding no lock, which could lead
to memory corruption.

THis should be backported to 2.1, 2.0 and 1.9.
include/proto/task.h