From: Willy Tarreau Date: Sat, 2 Feb 2019 12:18:01 +0000 (+0100) Subject: BUG/MINOR: threads: fix the process range of thread masks X-Git-Tag: v2.0-dev1~75 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bbcf2b9e0d17d83609ac529a21a258d2f2ea7bb8;p=thirdparty%2Fhaproxy.git BUG/MINOR: threads: fix the process range of thread masks Commit 421f02e ("MINOR: threads: add a MAX_THREADS define instead of LONGBITS") used a MAX_THREADS macros to fix threads limits. However, one change was wrong as it affected the upper bound of the process loop when setting threads masks. No backport is needed. --- diff --git a/src/listener.c b/src/listener.c index 553607af76..40419d5625 100644 --- a/src/listener.c +++ b/src/listener.c @@ -979,7 +979,7 @@ static int bind_parse_process(char **args, int cur_arg, struct proxy *px, struct conf->bind_proc |= proc; if (thread) { - for (i = 0; i < MAX_THREADS; i++) + for (i = 0; i < LONGBITS; i++) if (!proc || (proc & (1UL << i))) conf->bind_thread[i] |= thread; }