multipathd: sighandlers might use uninitialized gvecs
authorHannes Reinecke <hare@suse.de>
Tue, 8 Jan 2013 13:54:17 +0000 (14:54 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Tue, 8 Jan 2013 23:28:10 +0000 (00:28 +0100)
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

index 3a6e88f..f491a24 100644 (file)
@@ -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);
        /*