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

[dm-devel] [PATCH 40/42] multipathd: sighandlers might use uninitialized gvecs



gvecs are initialized after signal handlers, which in turn
might access the vectors.
So the signal handlers might access uninitialized variables.

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

diff --git a/multipathd/main.c b/multipathd/main.c
index 3a6e88f..f491a24 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1617,14 +1617,14 @@ child (void * param)
 
 	}
 
-	signal_init();
-	setscheduler();
-	set_oom_adj();
 	vecs = gvecs = init_vecs();
-
 	if (!vecs)
 		exit(1);
 
+	signal_init();
+	setscheduler();
+	set_oom_adj();
+
 	conf->daemon = 1;
 	udev_set_sync_support(0);
 	/*
-- 
1.7.4.2


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