Skip to content

Commit

Permalink
eal: cleanup alarm and hotplug before memory detach
Browse files Browse the repository at this point in the history
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.

Fixes: 90b13ab ("alarm: remove direct access to interrupt handle")
Fixes: a0cc7be ("mem: cleanup multiprocess resources")
Cc: stable@dpdk.org

Signed-off-by: Fengnan Chang <changfengnan@bytedance.com>
  • Loading branch information
Fengnan Chang authored and tmonjalo committed Feb 15, 2023
1 parent 04ed18c commit cc75968
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ Farah Smith <farah.smith@broadcom.com>
Fei Chen <chenwei.0515@bytedance.com>
Feifei Wang <feifei.wang2@arm.com> <feifei.wang@arm.com>
Fei Qin <fei.qin@corigine.com>
Fengnan Chang <changfengnan@bytedance.com>
Fengtian Guo <fengtian.guo@6wind.com>
Ferdinand Thiessen <rpm@fthiessen.de>
Ferruh Yigit <ferruh.yigit@amd.com> <ferruh.yigit@intel.com> <ferruh.yigit@xilinx.com> <ferruhy@gmail.com>
Expand Down
2 changes: 1 addition & 1 deletion lib/eal/freebsd/eal.c
Original file line number Diff line number Diff line change
Expand Up @@ -896,9 +896,9 @@ rte_eal_cleanup(void)
eal_bus_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;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/eal/linux/eal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1374,11 +1374,11 @@ rte_eal_cleanup(void)
eal_bus_cleanup();
rte_trace_save();
eal_trace_fini();
eal_mp_dev_hotplug_cleanup();
rte_eal_alarm_cleanup();
/* after this point, any DPDK pointers will become dangling */
rte_eal_memory_detach();
eal_mp_dev_hotplug_cleanup();
rte_eal_malloc_heap_cleanup();
rte_eal_alarm_cleanup();
eal_cleanup_config(internal_conf);
rte_eal_log_cleanup();
return 0;
Expand Down

0 comments on commit cc75968

Please sign in to comment.