]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: stick-tables: Fix race with peers when trashing oldest entries
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 21 May 2024 12:21:58 +0000 (14:21 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 24 May 2024 09:52:11 +0000 (11:52 +0200)
commitdfd938bad6d9b7af8ca41d7044ae6e6b787abcbc
tree94442718c342c7c1163a8074d51eb16dc7c9237d
parent51f9f6cfd49d816017ffbac884c0b5b88cc67e32
BUG/MEDIUM: stick-tables: Fix race with peers when trashing oldest entries

It is the same that the one fixed in process_table_expire() (21447b1dd4
["BUG/MAJOR: stick-tables: fix race with peers in entry expiration"]). In
stktable_trash_oldest(), when the update lock is acquired, we must take care
to check again the ref_cnt because some peers may increment it (See commit
above for details).

This patch fixes a crash mentionned in 2552#issuecomment-2110532706. It must
be backported to 2.9.
src/stick_table.c