From 912b1bdca60daec3b101964da98f2855ee4421e7 Mon Sep 17 00:00:00 2001 From: Jeff Lucovsky Date: Thu, 8 Feb 2024 09:12:47 -0500 Subject: [PATCH] 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) --- src/source-netmap.c | 1 + 1 file changed, 1 insertion(+) 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)); } -- 2.47.3