]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: pools: maintain consistent ->allocated count on alloc failures
authorWilly Tarreau <w@1wt.eu>
Thu, 15 Apr 2021 15:31:19 +0000 (17:31 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 19 Apr 2021 13:24:33 +0000 (15:24 +0200)
commit932dd19cc3dd959b1937e90651a0fb3d7b46aa7c
tree3a64fcae2fc959910734b7b8f735a906b09d240c
parent2963fd34f890b0fd04b26d3ba8f2c1932f2de313
BUG/MINOR: pools: maintain consistent ->allocated count on alloc failures

When running with CONFIG_HAP_NO_GLOBAL_POOLS, it's theoritically possible
to keep an incorrect count of allocated entries in a pool because the
allocated counter was used as a cumulated counter of alloc calls instead
of a number of currently allocated items (it's possible the meaning has
changed over time). The only impact in this mode essentially is that
"show pools" will report incorrect values. But this would only happen on
limited pools, which is not even certain still exist.

This was added by recent commit 0bae07592 ("MEDIUM: pools: add
CONFIG_HAP_NO_GLOBAL_POOLS and CONFIG_HAP_GLOBAL_POOLS") so no backport
is needed.
src/pool.c