From: Jeff Lucovsky Date: Thu, 8 Feb 2024 14:12:47 +0000 (-0500) Subject: netmap: Release lock to avoid deadlock X-Git-Tag: suricata-8.0.0-beta1~1782 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=364adeeb0442592ceea4d329622ca5fe34bf31fd;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. --- 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)); }