From: Christophe Varoqui Date: Wed, 25 May 2011 21:21:42 +0000 (+0200) Subject: Fix hang on reconfigure CLI command X-Git-Tag: upstream/0.5.0~98 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e14dd49d9cdd0b57e585ab7dc19b4e2fdb7fca2e;p=platform%2Fupstream%2Fmultipath-tools.git 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(). --- 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);