[dm-devel] [PATCH 05/15] multipathd: fix memory corruption issue

Benjamin Marzinski bmarzins at redhat.com
Sun Mar 8 03:31:36 UTC 2015


setup_multipath already removes the mpp if it fails, so we shouldn't be
accessing the mpp at all if it fails, and especially not freeing it.

Signed-off-by: Benjamin Marzinski <bmarzins at redhat.com>
---
 multipathd/main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/multipathd/main.c b/multipathd/main.c
index 3afed62..a194c80 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -657,9 +657,8 @@ ev_remove_path (struct path *pp, struct vectors * vecs)
 			/*
 			 * update our state from kernel
 			 */
-			if (setup_multipath(vecs, mpp)) {
-				goto fail;
-			}
+			if (setup_multipath(vecs, mpp))
+				return 1;
 			sync_map_state(mpp);
 
 			condlog(2, "%s [%s]: path removed from map %s",
-- 
1.8.3.1




More information about the dm-devel mailing list