From: Willy Tarreau Date: Fri, 15 Jul 2022 06:27:56 +0000 (+0200) Subject: BUG/MINOR: thread: use the correct thread's group in ha_tkillall() X-Git-Tag: v2.7-dev2~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f15c75a2d3ee636b1223ca6f243d3b56bf0462a9;p=thirdparty%2Fhaproxy.git BUG/MINOR: thread: use the correct thread's group in ha_tkillall() In ha_tkillall(), the current thread's group was used to check for the thread being running instead of using the target thread's group mask. Most of the time it would not have any effect unless some groups are uneven where it can lead to incomplete thread dumps for example. No backport is needed, this is purely 2.7. --- diff --git a/src/thread.c b/src/thread.c index 1cf0a746f6..551f5e6d4f 100644 --- a/src/thread.c +++ b/src/thread.c @@ -319,7 +319,7 @@ void ha_tkillall(int sig) unsigned int thr; for (thr = 0; thr < global.nbthread; thr++) { - if (!(tg->threads_enabled & ha_thread_info[thr].ltid_bit)) + if (!(ha_thread_info[thr].tg->threads_enabled & ha_thread_info[thr].ltid_bit)) continue; if (thr == tid) continue;