Blame SOURCES/0004-Issue-5085-Race-condition-about-snmp-collator-at-sta.patch

cb1cc6
From 16536e5d306727761ffd10403f4762956f177147 Mon Sep 17 00:00:00 2001
cb1cc6
From: progier389 <progier@redhat.com>
cb1cc6
Date: Wed, 5 Jan 2022 12:09:27 +0100
cb1cc6
Subject: [PATCH] Issue 5085 - Race condition about snmp collator at startup
cb1cc6
 (#5086)
cb1cc6
cb1cc6
---
cb1cc6
 ldap/servers/slapd/snmp_collator.c | 3 +--
cb1cc6
 1 file changed, 1 insertion(+), 2 deletions(-)
cb1cc6
cb1cc6
diff --git a/ldap/servers/slapd/snmp_collator.c b/ldap/servers/slapd/snmp_collator.c
cb1cc6
index 10a99475d..ed34d2ac4 100644
cb1cc6
--- a/ldap/servers/slapd/snmp_collator.c
cb1cc6
+++ b/ldap/servers/slapd/snmp_collator.c
cb1cc6
@@ -201,7 +201,7 @@ set_snmp_interaction_row(char *host, int port, int error)
cb1cc6
 
cb1cc6
     /* The interactions table is using the default (first) snmp_vars*/
cb1cc6
     snmp_vars = g_get_first_thread_snmp_vars(&cookie);
cb1cc6
-    if (snmp_vars == NULL)
cb1cc6
+    if (snmp_vars == NULL || interaction_table_mutex == NULL)
cb1cc6
         return;
cb1cc6
 
cb1cc6
     /* stevross: our servers don't have a concept of dsName as a distinguished name
cb1cc6
@@ -856,7 +856,6 @@ snmp_update_cache_stats(void)
cb1cc6
 
cb1cc6
         if (search_result == 0) {
cb1cc6
             int cookie;
cb1cc6
-            uint64_t total;
cb1cc6
             struct snmp_vars_t *snmp_vars;
cb1cc6
             slapi_pblock_get(search_result_pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES,
cb1cc6
                              &search_entries);
cb1cc6
-- 
cb1cc6
2.31.1
cb1cc6