aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Varoqui <christophe.varoqui@opensvc.com>2011-05-25 23:21:42 +0200
committerChristophe Varoqui <christophe.varoqui@opensvc.com>2011-05-25 23:21:42 +0200
commite14dd49d9cdd0b57e585ab7dc19b4e2fdb7fca2e (patch)
tree118c0d0dfd088534594704da924a035ee1e74e4a
parentfded849ba2900f6a5700836dc0505ad1f6d79124 (diff)
downloadmultipath-tools-e14dd49d9cdd0b57e585ab7dc19b4e2fdb7fca2e.tar.gz
Fix hang on reconfigure CLI command
Restore the vector locking outside the reconfigure() function. Moving it inside caused a double-lock hang situation. The first locker being uxsock_trigger(), caller of reconfigure(). Discussion on-going on wether we'd better stop locking from uxsock_trigger().
-rw-r--r--multipathd/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/multipathd/main.c b/multipathd/main.c
index cc75921..e0606b6 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1332,7 +1332,6 @@ reconfigure (struct vectors * vecs)
struct config * old = conf;
int retval = 1;
- lock(vecs->lock);
/*
* free old map and path vectors ... they use old conf state
*/
@@ -1353,7 +1352,6 @@ reconfigure (struct vectors * vecs)
retval = 0;
}
- unlock(vecs->lock);
return retval;
}
@@ -1411,7 +1409,9 @@ sighup (int sig)
if (running_state != DAEMON_RUNNING)
return;
+ lock(gvecs->lock);
reconfigure(gvecs);
+ unlock(gvecs->lock);
#ifdef _DEBUG_
dbg_free_final(NULL);