]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mt_lists: Avoid el->prev = el->next = el
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 23 Oct 2025 12:41:23 +0000 (14:41 +0200)
committerOlivier Houchard <cognet@ci0.org>
Thu, 23 Oct 2025 12:43:51 +0000 (14:43 +0200)
commitf40f5401b9f24becc6fdd2e77d4f4578bbecae7f
treecd4d237449fbc900552114cfc150e13d9d512227
parentd0f9515e5c13d24a4aaa0a100acb300f3c3daa28
BUG/MEDIUM: mt_lists: Avoid el->prev = el->next = el

Avoid setting both el->prev and el->next on the same line.
The goal is to set both el->prev and el->next to el, but a naive
compiler, such as when we're using -O0, will set el->next first, then
will set el->prev to the value of el->next, but if we're unlucky,
el->next will have been set to something else by another thread.
So explicitely set both to what we want.

This should be backported up to 2.8.
include/import/mt_list.h