mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-07 15:51:23 -05:00
BUG/MINOR: config: fix bind line thread mask validation
When no nbproc is specified, a computation leads to reading bind_thread[-1] before checking if the thread mask is valid for a bind conf. It may either report a false warning and compute a wrong mask, or miss some incorrect configs. This must be backported to 1.9 and possibly 1.8.
This commit is contained in:
parent
bbcf2b9e0d
commit
6b4a39adc4
1 changed files with 2 additions and 2 deletions
|
|
@ -2288,9 +2288,9 @@ int check_config_validity()
|
|||
/* detect and address thread affinity inconsistencies */
|
||||
nbproc = 0;
|
||||
if (bind_conf->bind_proc)
|
||||
nbproc = my_ffsl(bind_conf->bind_proc);
|
||||
nbproc = my_ffsl(bind_conf->bind_proc) - 1;
|
||||
|
||||
mask = bind_conf->bind_thread[nbproc - 1];
|
||||
mask = bind_conf->bind_thread[nbproc];
|
||||
if (mask && !(mask & all_threads_mask)) {
|
||||
unsigned long new_mask = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue