]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: thread: use the correct thread's group in ha_tkillall()
authorWilly Tarreau <w@1wt.eu>
Fri, 15 Jul 2022 06:27:56 +0000 (08:27 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 15 Jul 2022 17:41:26 +0000 (19:41 +0200)
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

index 1cf0a746f6251819102292193f0a34a518e74204..551f5e6d4f4fc58c4be1266bc73cea8182db7e68 100644 (file)
@@ -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;