From: Jeff Lucovsky Date: Thu, 8 Feb 2024 14:12:47 +0000 (-0500) Subject: netmap: Release lock to avoid deadlock X-Git-Tag: suricata-7.0.4~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=912b1bdca60daec3b101964da98f2855ee4421e7;p=thirdparty%2Fsuricata.git netmap: Release lock to avoid deadlock Issue: 6755 When NetmapOpen encounters an error opening the netmap device, it'll retry a bit. When the retry limit is reached, it'll shutdown Suricata. This commit ensures that the device list lock is not held when before closing all open devices before terminating Suricata. (cherry picked from commit 364adeeb0442592ceea4d329622ca5fe34bf31fd) --- diff --git a/src/source-netmap.c b/src/source-netmap.c index 0b04b41b52..8e409ea00e 100644 --- a/src/source-netmap.c +++ b/src/source-netmap.c @@ -453,6 +453,7 @@ retry: } } + SCMutexUnlock(&netmap_devlist_lock); NetmapCloseAll(); FatalError("opening devname %s failed: %s", devname, strerror(errno)); }