]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mt_list: Make sure not to unlock the element twice
authorOlivier Houchard <cognet@ci0.org>
Sun, 19 Oct 2025 21:17:55 +0000 (23:17 +0200)
committerOlivier Houchard <cognet@ci0.org>
Sun, 19 Oct 2025 21:21:42 +0000 (23:21 +0200)
commit7a33b90b3cdcf26e4a73bee9e89a4fe670eee167
tree8ad40e482d32b9090f3d8ca885121c0c987f6f78
parentaa259f5b42869e4158093b831683750b44cfe0b6
BUG/MEDIUM: mt_list: Make sure not to unlock the element twice

In mt_list_delete(), if the element was not in a list, then n and p will
point to it, and so setting n->prev and n->next will be enough to unlock it.
Don't do it twice, as once it's been done the first time, another thread may
be working with it, and may have added it to a list already, and doing it
a second time can lead to list inconsistencies.

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