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 442CE4891E; Mon, 13 Oct 2025 05:02:53 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C4AD54021E; Mon, 13 Oct 2025 05:02:52 +0200 (CEST) Received: from canpmsgout09.his.huawei.com (canpmsgout09.his.huawei.com [113.46.200.224]) by mails.dpdk.org (Postfix) with ESMTP id 336394013F for ; Mon, 13 Oct 2025 05:02:47 +0200 (CEST) dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=ymahN/BXoB+HG/9Q9M4vgH8JLiL7s+EWQUdNZwZCqPI=; b=b388rDE2G3Cq5Ret4CJuTlipvqsC1F+WWyfLFDIAc1nZohgxPB5EQTEqX81h68p+J+2amv8ow MpxLimO97AHQlUZpOgghK/z4mwocJQGy1dVDssJf2f0PjzFo4wWFIWrNnf1EOZcs7ho9PdIpKv4 LWj4VXAsOgZwpnwr0NFShAM= Received: from mail.maildlp.com (unknown [172.19.162.112]) by canpmsgout09.his.huawei.com (SkyGuard) with ESMTPS id 4clMb64S9bz1cyQ3; Mon, 13 Oct 2025 11:02:26 +0800 (CST) Received: from kwepemk500009.china.huawei.com (unknown [7.202.194.94]) by mail.maildlp.com (Postfix) with ESMTPS id 7C00F140142; Mon, 13 Oct 2025 11:02:45 +0800 (CST) Received: from localhost.localdomain (10.50.163.32) by kwepemk500009.china.huawei.com (7.202.194.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 13 Oct 2025 11:02:44 +0800 From: Chengwen Feng To: , CC: , , Subject: [PATCH v3 01/13] app/dma-perf: fix use-after-free Date: Mon, 13 Oct 2025 11:02:24 +0800 Message-ID: <20251013030236.3861-2-fengchengwen@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20251013030236.3861-1-fengchengwen@huawei.com> References: <20250811105430.55791-1-fengchengwen@huawei.com> <20251013030236.3861-1-fengchengwen@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.50.163.32] X-ClientProxiedBy: kwepems500001.china.huawei.com (7.221.188.70) To kwepemk500009.china.huawei.com (7.202.194.94) 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 The test_case->eal_args was pointer the entry of cfgfile, it will be used later, but the cfgfile was closed in load_configs(). This commit fix it by using strdup. Fixes: 623dc9364dc6 ("app/dma-perf: introduce DMA performance test") Cc: stable@dpdk.org Signed-off-by: Chengwen Feng Acked-by: Vamsi Attunuru --- app/test-dma-perf/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test-dma-perf/main.c b/app/test-dma-perf/main.c index 0586b3e1d0..25a79d1d6c 100644 --- a/app/test-dma-perf/main.c +++ b/app/test-dma-perf/main.c @@ -480,6 +480,8 @@ load_configs(const char *path) section_name, "test_seconds")); test_case->eal_args = rte_cfgfile_get_entry(cfgfile, section_name, "eal_args"); + if (test_case->eal_args != NULL) + test_case->eal_args = strdup(test_case->eal_args); test_case->is_valid = true; } -- 2.17.1