From 7c8d5b0afdf14a16ef48e7f4759572f50c63d419 Mon Sep 17 00:00:00 2001 From: Brenton Bostick Date: Tue, 18 Apr 2023 14:12:33 -0500 Subject: [PATCH 1/2] _bond_m guards _bond, not _paths_m (#1965) --- node/Peer.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/Peer.hpp b/node/Peer.hpp index 668bbbee9..e6e9b65ed 100644 --- a/node/Peer.hpp +++ b/node/Peer.hpp @@ -504,7 +504,7 @@ public: * @return The bonding policy used to reach this peer */ inline int8_t bondingPolicy() { - Mutex::Lock _l(_paths_m); + Mutex::Lock _l(_bond_m); if (_bond) { return _bond->policy(); } From 1b59712c48318eff11225d03060b4f66aacbcd59 Mon Sep 17 00:00:00 2001 From: Brenton Bostick Date: Tue, 18 Apr 2023 14:14:05 -0500 Subject: [PATCH 2/2] Fix: warning: mutex '_aqm_m' is not held on every path through here [-Wthread-safety-analysis] (#1964) --- node/Switch.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/node/Switch.cpp b/node/Switch.cpp index 9a81e532e..59ed34a04 100644 --- a/node/Switch.cpp +++ b/node/Switch.cpp @@ -642,6 +642,7 @@ void Switch::aqm_enqueue(void *tPtr, const SharedPtr &network, Packet & } } if (!selectedQueue) { + _aqm_m.unlock(); return; }