From f15c75a2d3ee636b1223ca6f243d3b56bf0462a9 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 15 Jul 2022 08:27:56 +0200 Subject: [PATCH] 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. --- src/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/thread.c b/src/thread.c index 1cf0a746f..551f5e6d4 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;