From: Victor Julien Date: Tue, 4 Feb 2014 17:18:46 +0000 (+0100) Subject: profiling: end profiling tunnel packets inside lock X-Git-Tag: suricata-2.0rc1~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F820%2Fhead;p=thirdparty%2Fsuricata.git profiling: end profiling tunnel packets inside lock End profiling inside the lock for a tunnel packet as otherwise another thread may already free the packet while the profiling code runs. SEGV's observed and now gone. --- diff --git a/src/tmqh-packetpool.c b/src/tmqh-packetpool.c index 1053d6be38..531af50c33 100644 --- a/src/tmqh-packetpool.c +++ b/src/tmqh-packetpool.c @@ -213,9 +213,8 @@ void TmqhOutputPacketpool(ThreadVars *t, Packet *p) * when we handle them */ SET_TUNNEL_PKT_VERDICTED(p); - SCMutexUnlock(m); - PACKET_PROFILING_END(p); + SCMutexUnlock(m); SCReturn; } } else {