From: Fengnan Chang <changfengnan@bytedance.com>
To: ktraynor@redhat.com
Cc: dev@dpdk.org, Fengnan Chang <changfengnan@bytedance.com>
Subject: [PATCH 21.11] eal: cleanup alarm and hotplug before memory detach
Date: Thu, 16 Mar 2023 19:48:18 +0800 [thread overview]
Message-ID: <20230316114818.99552-1-changfengnan@bytedance.com> (raw)
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(-)
diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c
index 414aad3dd3..717d1f0b9a 100644
--- a/lib/eal/freebsd/eal.c
+++ b/lib/eal/freebsd/eal.c
@@ -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;
}
diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
index e3d34f7b7c..84c42679bf 100644
--- a/lib/eal/linux/eal.c
+++ b/lib/eal/linux/eal.c
@@ -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;
}
--
2.37.1 (Apple Git-137.1)
reply other threads:[~2023-03-16 11:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230316114818.99552-1-changfengnan@bytedance.com \
--to=changfengnan@bytedance.com \
--cc=dev@dpdk.org \
--cc=ktraynor@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).