From: Chengwen Feng <fengchengwen@huawei.com>
To: <thomas@monjalon.net>, <honest.jiang@foxmail.com>
Cc: <dev@dpdk.org>, <liuyonglong@huawei.com>
Subject: [PATCH 01/10] app/dma-perf: fix use-after-free
Date: Tue, 12 Aug 2025 10:06:59 +0800 [thread overview]
Message-ID: <20250812020708.16186-2-fengchengwen@huawei.com> (raw)
In-Reply-To: <20250812020708.16186-1-fengchengwen@huawei.com>
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 <fengchengwen@huawei.com>
---
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
next prev parent reply other threads:[~2025-08-12 2:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-11 10:54 [PATCH 0/9] bugfix and refactor of dma-perf Chengwen Feng
2025-08-11 10:54 ` [PATCH 1/9] app/dma-perf: fix use-after-free Chengwen Feng
2025-08-11 10:54 ` [PATCH 2/9] app/dma-perf: add global section for config file Chengwen Feng
2025-08-11 10:54 ` [PATCH 3/9] app/dma-perf: use argparse lib to parse argument Chengwen Feng
2025-08-11 10:54 ` [PATCH 4/9] app/dma-perf: refactor output csv Chengwen Feng
2025-08-11 10:54 ` [PATCH 5/9] app/dma-perf: support list DMA devices Chengwen Feng
2025-08-11 10:54 ` [PATCH 6/9] app/dma-perf: add more global config Chengwen Feng
2025-08-11 10:54 ` [PATCH 7/9] app/dma-perf: remove invalid or redundant field Chengwen Feng
2025-08-11 10:54 ` [PATCH 8/9] app/dma-perf: refactor load config function Chengwen Feng
2025-08-11 10:54 ` [PATCH 9/9] app/dma-perf: refactor benchmark function Chengwen Feng
2025-08-12 2:06 ` [PATCH 00/10] bugfix and refactor of dma-perf Chengwen Feng
2025-08-12 2:06 ` Chengwen Feng [this message]
2025-08-12 2:07 ` [PATCH 02/10] app/dma-perf: add global section for config file Chengwen Feng
2025-08-12 2:07 ` [PATCH 03/10] app/dma-perf: use argparse lib to parse argument Chengwen Feng
2025-08-12 2:07 ` [PATCH 04/10] app/dma-perf: refactor output csv Chengwen Feng
2025-08-12 2:07 ` [PATCH 05/10] app/dma-perf: support list DMA devices Chengwen Feng
2025-08-12 2:07 ` [PATCH 06/10] app/dma-perf: add more global config Chengwen Feng
2025-08-12 2:07 ` [PATCH 07/10] app/dma-perf: remove invalid or redundant field Chengwen Feng
2025-08-12 2:07 ` [PATCH 08/10] app/dma-perf: refactor load config function Chengwen Feng
2025-08-12 2:07 ` [PATCH 09/10] app/dma-perf: refactor benchmark function Chengwen Feng
2025-08-12 2:07 ` [PATCH 10/10] app/dma-perf: support specific error info Chengwen Feng
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=20250812020708.16186-2-fengchengwen@huawei.com \
--to=fengchengwen@huawei.com \
--cc=dev@dpdk.org \
--cc=honest.jiang@foxmail.com \
--cc=liuyonglong@huawei.com \
--cc=thomas@monjalon.net \
/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).