[21.11] eal: cleanup alarm and hotplug before memory detach
Checks
Commit Message
Alarm and multiprocess hotplug still need access hugepage memory,
if alarm event processed after memory detach, it may cause SEGV.
So cleanup alarm and multiprocess hotplug before memory detach.
Signed-off-by: Fengnan Chang <changfengnan@bytedance.com>
---
lib/eal/freebsd/eal.c | 2 +-
lib/eal/linux/eal.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
@@ -988,9 +988,9 @@ rte_eal_cleanup(void)
rte_mp_channel_cleanup();
rte_trace_save();
eal_trace_fini();
+ rte_eal_alarm_cleanup();
/* after this point, any DPDK pointers will become dangling */
rte_eal_memory_detach();
- rte_eal_alarm_cleanup();
eal_cleanup_config(internal_conf);
return 0;
}
@@ -1370,9 +1370,9 @@ rte_eal_cleanup(void)
rte_mp_channel_cleanup();
rte_trace_save();
eal_trace_fini();
+ rte_eal_alarm_cleanup();
/* after this point, any DPDK pointers will become dangling */
rte_eal_memory_detach();
- rte_eal_alarm_cleanup();
eal_cleanup_config(internal_conf);
return 0;
}