From 8eb87f398f9fae36de66a568d0393e4a5b26827c Mon Sep 17 00:00:00 2001
From: Morris Jette <jette@schedmd.com>
Date: Fri, 7 Nov 2014 15:05:05 -0800
Subject: [PATCH] Make slurmd lock order consistent

helgrind found the locks here were being make in reverse order
after the initial locks at the top of the function.
---
 src/slurmd/slurmd/slurmd.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/slurmd/slurmd/slurmd.c b/src/slurmd/slurmd/slurmd.c
index a943606d4ce..a041ecd9671 100644
--- a/src/slurmd/slurmd/slurmd.c
+++ b/src/slurmd/slurmd/slurmd.c
@@ -771,10 +771,8 @@ _read_config(void)
 #ifndef HAVE_FRONT_END
 	bool cr_flag = false, gang_flag = false;
 #endif
-
-	cf = slurm_conf_lock();
-
 	slurm_mutex_lock(&conf->config_mutex);
+	cf = slurm_conf_lock();
 
 	conf->chos_loc = xstrdup(cf->chos_loc);
 
-- 
GitLab