]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: fd/threads: fix again incorrect thread selection in wakeup broadcast
authorWilly Tarreau <w@1wt.eu>
Thu, 19 Jan 2023 16:10:10 +0000 (17:10 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 19 Jan 2023 18:22:17 +0000 (19:22 +0100)
commitad90110338f10e464fda81f5cc5421ff31e01cb0
tree7fc26ca26e43cb5536b8650f8a133fc2f32b67c8
parentedfcb55417d15e2808c64fc2b420e98f1a561751
BUG/MEDIUM: fd/threads: fix again incorrect thread selection in wakeup broadcast

Commit c1640f79f ("BUG/MEDIUM: fd/threads: fix incorrect thread selection
in wakeup broadcast") fixed an incorrect range being used to pick a thread
when broadcasting a wakeup for a foreign thread, but the selection was still
wrong as the number of threads and their mask was taken from the current
thread instead of the target thread. In addition, the code dealing with the
wakeup of a thread from the same group was still relying on MAX_THREADS
instead of tg->count.

This could theoretically cause random crashes with more than one thread
group though this was never encountered.

This needs to be backported to 2.7.
src/fd.c