代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/dpdk 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 9db4a191823cb2dec68c4be50bb1143c141da22c Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 2 Mar 2023 07:50:11 +0000
Subject: dma/skeleton: fix empty devargs parsing
[ upstream commit e0e5dd0450db22fc7712da4b5a8e6fd6e081c870 ]
The rte_kvargs_process() was used to parse KV pairs, it also supports
to parse 'only keys' (e.g. socket_id) type. And the callback function
parameter 'value' is NULL when parsed 'only keys'.
This patch fixes segment fault when parse input args with 'only keys'
(e.g. lcore).
Fixes: 05d5fc66a269 ("dma/skeleton: introduce skeleton driver")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
drivers/dma/skeleton/skeleton_dmadev.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/skeleton/skeleton_dmadev.c b/drivers/dma/skeleton/skeleton_dmadev.c
index 81cbdd286e..67e0357cf0 100644
--- a/drivers/dma/skeleton/skeleton_dmadev.c
+++ b/drivers/dma/skeleton/skeleton_dmadev.c
@@ -500,9 +500,15 @@ skeldma_parse_lcore(const char *key __rte_unused,
const char *value,
void *opaque)
{
- int lcore_id = atoi(value);
+ int lcore_id;
+
+ if (value == NULL || opaque == NULL)
+ return -EINVAL;
+
+ lcore_id = atoi(value);
if (lcore_id >= 0 && lcore_id < RTE_MAX_LCORE)
*(int *)opaque = lcore_id;
+
return 0;
}
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。