]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: stick-tables: Make sure not to free a pending entry
authorOlivier Houchard <ohouchard@haproxy.com>
Tue, 30 Sep 2025 13:16:44 +0000 (15:16 +0200)
committerOlivier Houchard <cognet@ci0.org>
Tue, 30 Sep 2025 14:25:07 +0000 (16:25 +0200)
commit21ae35dd299b2b09a8ed5cb75a61fe3e2e89b013
treef93366ef463d19db264651b618fa59995c542938
parentcf26745857d1c4bbaf6404f57c47bb7c114c6905
BUG/MEDIUM: stick-tables: Make sure not to free a pending entry

There is a race condition, an entry can be free'd by stksess_kill()
between the time stktable_add_pend_updates() gets the entry from the
mt_list, and the time it adds it to the ebtree.
To prevent this, use the newly implemented MT_LIST_POP_LOCKED() to keep
the stksess locked until it is added to the tree. That way,
__stksess_kill() will wait until we're done with it.

This should be backported to 3.2.
src/stick_table.c