New upstream version 18.11.2
[deb_dpdk.git] / lib / librte_eal / bsdapp / eal / eal.c
index f01495e..bfac7fd 100644 (file)
@@ -227,7 +227,7 @@ rte_eal_config_create(void)
                return;
 
        if (mem_cfg_fd < 0){
-               mem_cfg_fd = open(pathname, O_RDWR | O_CREAT, 0660);
+               mem_cfg_fd = open(pathname, O_RDWR | O_CREAT, 0600);
                if (mem_cfg_fd < 0)
                        rte_panic("Cannot open '%s' for rte_mem_config\n", pathname);
        }
@@ -662,6 +662,12 @@ rte_eal_init(int argc, char **argv)
                return -1;
        }
 
+       if (rte_eal_alarm_init() < 0) {
+               rte_eal_init_alert("Cannot init interrupt-handling thread");
+               /* rte_eal_alarm_init sets rte_errno on failure. */
+               return -1;
+       }
+
        /* Put mp channel init before bus scan so that we can init the vdev
         * bus through mp channel in the secondary process before the bus scan.
         */
@@ -751,12 +757,6 @@ rte_eal_init(int argc, char **argv)
                return -1;
        }
 
-       if (rte_eal_alarm_init() < 0) {
-               rte_eal_init_alert("Cannot init interrupt-handling thread");
-               /* rte_eal_alarm_init sets rte_errno on failure. */
-               return -1;
-       }
-
        if (rte_eal_timer_init() < 0) {
                rte_eal_init_alert("Cannot init HPET or TSC timers");
                rte_errno = ENOTSUP;