[PATCH 41/42] multipathd: crash in reconfigure CLI command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The 'reconfigure' CLI command doesn't take the vector lock,
so if multipathd is processing a table / udev event at the
same time it'll crash.

Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
---
 multipathd/main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/multipathd/main.c b/multipathd/main.c
index f491a24..395307e 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1389,6 +1389,7 @@ 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
 	 */
@@ -1409,6 +1410,7 @@ reconfigure (struct vectors * vecs)
 		retval = 0;
 	}
 
+	unlock(vecs->lock);
 	return retval;
 }
 
@@ -1466,9 +1468,7 @@ sighup (int sig)
 	if (running_state != DAEMON_RUNNING)
 		return;
 
-	lock(gvecs->lock);
 	reconfigure(gvecs);
-	unlock(gvecs->lock);
 
 #ifdef _DEBUG_
 	dbg_free_final(NULL);
-- 
1.7.4.2

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel


[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux