]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: fd/threads: fix incorrect thread selection in wakeup broadcast
authorWilly Tarreau <w@1wt.eu>
Tue, 19 Jul 2022 13:58:00 +0000 (15:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 19 Jul 2022 14:01:04 +0000 (16:01 +0200)
commitc1640f79fe54ba7abdb11ce5010de5e64602e387
tree4d776fe764af8878006e3f5fb54b48574d3f41bc
parent7e94b40a22fab080b072c4757d487a40d2c6f828
BUG/MEDIUM: fd/threads: fix incorrect thread selection in wakeup broadcast

In commit cfdd20a0b ("MEDIUM: fd: support broadcasting updates for foreign
groups in updt_fd_polling") we decided to pick a random thread number among
a set of candidates for a wakeup in case we need an instant change. But the
thread count range was wrong (MAX_THREADS) instead of tg->count, resulting
in random crashes when thread groups are > 1 and MAX_THREADS > 64.

No backport is needed, this was introduced in 2.7-dev2.
src/fd.c