mirror of https://github.com/OISF/suricata
threading: don't pass locked flow between threads
Previously the flow manager would share evicted flows with the workers while keeping the flows mutex locked. This reduced the number of unlock/ lock cycles while there was guaranteed to be no contention. This turns out to be undefined behavior. A lock is supposed to be locked and unlocked from the same thread. It appears that FreeBSD is stricter on this than Linux. This patch addresses the issue by unlocking before handing a flow off to another thread, and locking again from the new thread. Issue was reported and largely analyzed by Bill Meeks. Bug: #4478pull/6306/head
parent
cf21694ba6
commit
9551cd0535
Loading…
Reference in New Issue