From: Olivier Houchard Date: Mon, 29 Jun 2020 15:48:27 +0000 (+0200) Subject: BUG/MINOR: threads: Don't forget to init each thread toremove_lock. X-Git-Tag: v2.2-dev12~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f21695bd8b59d582efc99c85f9a1afac200eda81;p=thirdparty%2Fhaproxy.git BUG/MINOR: threads: Don't forget to init each thread toremove_lock. Don't forget to use HA_SPIN_INIT() on each toremove_lock, or DEBUG_THREAD may not work reliably with it. This should be backported to 2.1 and 2.0. --- diff --git a/src/cfgparse.c b/src/cfgparse.c index 4b0dc9e51a..e3f3d9fae6 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -3571,6 +3571,7 @@ out_uri_auth_compat: goto err; idle_conns[i].cleanup_task->process = srv_cleanup_toremove_connections; idle_conns[i].cleanup_task->context = NULL; + HA_SPIN_INIT(&idle_conns[i].toremove_lock); MT_LIST_INIT(&idle_conns[i].toremove_conns); } }