]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: stktable: fix missing lock on some table converters
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 14 Jan 2025 10:18:24 +0000 (11:18 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Tue, 14 Jan 2025 10:36:04 +0000 (11:36 +0100)
commit8919a80da9391e348aa325b44fdae40a35f48dcf
tree9c471878c23090292917a6703334918c4362b55a
parentf399dbf70c658107ab0a94a403c26547f6ecea15
BUG/MEDIUM: stktable: fix missing lock on some table converters

In 819fc6f563
("MEDIUM: threads/stick-tables: handle multithreads on stick tables"),
sample fetch and action functions were properly guarded with stksess
read/write locks for read and write operations respectively, but the
sample_conv_table functions leveraged by "table_*" converters were
overlooked.

This bug was not known to cause issues in existing deployments yet (at
least it was not reported), but due to its nature it can theorically lead
to inconsistent values being reported by "table_*" converters if the value
is being updated by another thread in parallel.

It should be backported to all stable versions.

[ada: for versions < 3.0, glitch_cnt and glitch_rate samples should be
 ignored as they first appeared in 3.0]
src/stick_table.c