]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: stick-tables: Fix race with peers when killing a sticky session
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 23 May 2024 09:14:41 +0000 (11:14 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 24 May 2024 09:52:11 +0000 (11:52 +0200)
commit9938fb9c7a5b62d9c78b9c60caba744b6191fd1d
tree49e740335af60b79543d82d0eb8b61d6e2054ce0
parentdfd938bad6d9b7af8ca41d7044ae6e6b787abcbc
BUG/MEDIUM: stick-tables: Fix race with peers when killing a sticky session

When a sticky session is killed, we must be sure no other entity is still
referencing it. The session's ref_cnt must be 0. However, there is a race
with peers, as decribed in 21447b1dd4 ("BUG/MAJOR: stick-tables: fix race
with peers in entry expiration"). When the update lock is acquire, we must
recheck the ref_cnt value.

This patch is part of a debugging session about issue #2552. It must be
backported to 2.9.
src/stick_table.c