From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 84C28A034C; Sun, 18 Dec 2022 11:07:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DE04F41153; Sun, 18 Dec 2022 11:07:36 +0100 (CET) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mails.dpdk.org (Postfix) with ESMTP id 8956F40146 for ; Tue, 13 Dec 2022 08:59:57 +0100 (CET) Received: by mail-pl1-f181.google.com with SMTP id d15so5194695pls.6 for ; Mon, 12 Dec 2022 23:59:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=V5kA4rUGlaIo08oWlAO4akpbp9IFlIZNs+Ew8TCdr9o=; b=bUb+yB7Y9TETO4bVALB9M9elLKiexd0duoo6iMf21zG2IXCtUW0u4dDu0scjGgyqzE vQQOst1LhCyUCayeg8YeP+aObOf2TIIfMXDsPAKIa2aa0gqzxQQtiXPiCz4phn5JLbbT ijqUpd3uOZUX18CSHC76R/WjtBV5vHlKmTrevqiWg0ei5GPkMAvaymHPOgbjL70SOEMa OciKIlyafwOecVIb4T1/uv9XtsViBa025Ud0zVmGNgr10XrMJ1P71vHsUaD1rxGC+A1M rYxFbWu50/xA7bvDqBZcVqMp9i6YyuJQDJtvif3+4VY6jXrFf79Gq/DaVgoZHco+rJ4r Yfsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=V5kA4rUGlaIo08oWlAO4akpbp9IFlIZNs+Ew8TCdr9o=; b=eiA4PR4YYT4rgz5YuJHcUjQp3i9D1FsAv4boDF+S8FrvdRTxgEWOKOlzygyXpUFwub nSigCZ+Ra0VQeQ/pnC+u6OQZT07u4tUPKt8zHbDl/On+ifZVD8GiNmmIKyGZ+7ArI4om RfGimY8d0AJnvV8ELEYpHXFbBVW6+yjZpHQIpuuXYzUzXCkbhmgDoIx+JhuUaLxdaAmM WzJ1vSbpYnSOEqPGRegHw5GvelF9rdTu0OcLRPqCZNlgXPWT0QzCFiAY4+wdE8ecQ/MW mMWJJJLfL4O6plmvfb7HA8FhVuuGnlEGKoZXvZBrMqBwfNiKhYhjZObSJEpF1+BLsw3p bgZw== X-Gm-Message-State: ANoB5pk+3G83UlVHH+/8S9WXe7uVZsJ+S1rvU+MvVaRKFdM0izVHsd84 yVtHVg/Fp6DqnjCwQIZzwcTWtpf4bkZ4iasT X-Google-Smtp-Source: AA0mqf5djYjjuys76LjXe+iy0QDNckPEjuN9gpq3AoLqeFu3iRwVJ8IsSsxwKDNgm8k8V25PS1MdRQ== X-Received: by 2002:a17:90a:c68b:b0:219:93e0:82e8 with SMTP id n11-20020a17090ac68b00b0021993e082e8mr4450877pjt.2.1670918396514; Mon, 12 Dec 2022 23:59:56 -0800 (PST) Received: from HTW5T2C6VL.bytedance.net ([139.177.225.226]) by smtp.gmail.com with ESMTPSA id gl7-20020a17090b120700b00218f9bd50c7sm6601476pjb.50.2022.12.12.23.59.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 12 Dec 2022 23:59:56 -0800 (PST) From: Fengnan Chang To: dev@dpdk.org Cc: thomas@monjalon.net, david.marchand@redhat.com, Fengnan Chang Subject: [PATCH] eal: cleanup alarm and multiprocess hotplug before memory detach Date: Tue, 13 Dec 2022 15:59:38 +0800 Message-Id: <20221213075938.36964-1-changfengnan@bytedance.com> X-Mailer: git-send-email 2.37.0 (Apple Git-136) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Sun, 18 Dec 2022 11:07:34 +0100 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- lib/eal/linux/eal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c index 8c118d0d9f..c76f026023 100644 --- a/lib/eal/linux/eal.c +++ b/lib/eal/linux/eal.c @@ -1372,11 +1372,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; -- 2.37.0 (Apple Git-136)