From: Victor Julien Date: Thu, 14 May 2015 08:38:10 +0000 (+0200) Subject: flow: don't hold tv_root_lock longer than needed X-Git-Tag: suricata-3.0RC1~419 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=478719ee9d5be6f083268175b6afc5c2a643cb90;p=thirdparty%2Fsuricata.git flow: don't hold tv_root_lock longer than needed Don't hold it longer than needed in shutting down. --- diff --git a/src/flow-manager.c b/src/flow-manager.c index 56ccce3b24..8283a43e2e 100644 --- a/src/flow-manager.c +++ b/src/flow-manager.c @@ -142,13 +142,12 @@ void FlowDisableFlowManagerThread(void) } tv = tv->next; } + SCMutexUnlock(&tv_root_lock); /* wake up threads, another try */ for (u = 0; u < flowmgr_number; u++) SCCtrlCondSignal(&flow_manager_ctrl_cond); - SCMutexUnlock(&tv_root_lock); - /* reset count, so we can kill and respawn (unix socket) */ SC_ATOMIC_SET(flowmgr_cnt, 0); return;