]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: stick-tables: Fix return value for __stksess_kill()
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 14 Nov 2025 10:48:02 +0000 (11:48 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 14 Nov 2025 10:56:14 +0000 (11:56 +0100)
commit346d6c3ac78b3c05c2de1b26382a72ebef185d31
treefa8cdc25668149ccd156d293f524419a4a4f1a8a
parentbd4fff9a767945be278d84cc98dcbe2245652b59
BUG/MINOR: stick-tables: Fix return value for __stksess_kill()

The commit 9938fb9c7 ("BUG/MEDIUM: stick-tables: Fix race with peers when
killing a sticky session") introduced a regression.

__stksess_kill() must always return 0 if the session cannot be released. But
when the ref_cnt is tested under the update lock, a success is reported if
the session is still in-used. 0 must be returned in that case.

This bug is harmless because callers never use the return value of
__stksess_kill() or stksess_kill().

This bug must be backported as far as 3.0.
src/stick_table.c