]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: stick-tables: close a tiny race in __stksess_kill()
authorWilly Tarreau <w@1wt.eu>
Wed, 7 May 2025 16:43:57 +0000 (18:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 7 May 2025 16:49:21 +0000 (18:49 +0200)
commit0cee7b5b8d32c307f1feaeb72491597443f5a35b
tree448e432da3320a5e46e9a90784a3193a0c612bc8
parent006a3acbde309f11190a003c4ac1c026480444e4
BUG/MEDIUM: stick-tables: close a tiny race in __stksess_kill()

It might be possible not to see the element in the tree, then not to
see it in the update list, thus not to take the lock before deleting.
But an element in the list could have moved to the tree during the
check, and be removed later without the updt_lock.

Let's delete prior to checking the presence in the tree to avoid
this situation. No backport is needed since this arrived in -dev13
with the update list.
src/stick_table.c