[dm-devel] [PATCH 41/42] multipathd: crash in reconfigure CLI command
Hannes Reinecke
hare at suse.de
Tue Jan 8 13:54:18 UTC 2013
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 at suse.de>
---
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
More information about the dm-devel
mailing list