]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: stick-table: always remove update before adding a new one
authorWilly Tarreau <w@1wt.eu>
Thu, 8 May 2025 21:21:25 +0000 (23:21 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 8 May 2025 21:32:25 +0000 (23:32 +0200)
commit576e47fb9a93b408a613be580cdcdea0ce22fc8b
tree7818244c54a0a2743f06bb7618ff2fe8e62f53cf
parentf03e999912cd325ffae0997f53cd5e139555099d
BUG/MEDIUM: stick-table: always remove update before adding a new one

Since commit 388539faa ("MEDIUM: stick-tables: defer adding updates to a
tasklet"), between the entry creation and its arrival in the updates tree,
there is time for scheduling, and it now becomes possible for an stksess
entry to be requeued into the list while it's still in the tree as a remote
one. Only local updates were removed prior to being inserted. In this case
we would re-insert the entry, causing it to appear as the parent of two
distinct nodes or leaves, and to be visited from the first leaf during a
delete() after having already been removed and freed, causing a crash,
as Christian reported in issue #2959.

There's no reason to backport this as this appeared with the commit above
in 3.2-dev13.
src/stick_table.c