代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/dpdk 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 37b765efbca81e4aa81fcb685e7810398e800e29 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 2 Mar 2023 07:50:05 +0000
Subject: compressdev: fix empty devargs parsing
[ upstream commit bb27182482d61777de6a38b16a1d2c692c2c3f8b ]
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 in rte_compressdev_pmd_parse_uint_arg()
when parse input args with 'only keys' (e.g. socket_id).
For a similar reason, this patch fixes
rte_compressdev_pmd_parse_name_arg().
Fixes: ed7dd94f7f66 ("compressdev: add basic device management")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
lib/compressdev/rte_compressdev_pmd.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/compressdev/rte_compressdev_pmd.c b/lib/compressdev/rte_compressdev_pmd.c
index 7f500d76d4..6a11a396b7 100644
--- a/lib/compressdev/rte_compressdev_pmd.c
+++ b/lib/compressdev/rte_compressdev_pmd.c
@@ -20,6 +20,9 @@ rte_compressdev_pmd_parse_name_arg(const char *key __rte_unused,
struct rte_compressdev_pmd_init_params *params = extra_args;
int n;
+ if (value == NULL || extra_args == NULL)
+ return -EINVAL;
+
n = strlcpy(params->name, value, RTE_COMPRESSDEV_NAME_MAX_LEN);
if (n >= RTE_COMPRESSDEV_NAME_MAX_LEN)
return -EINVAL;
@@ -37,6 +40,9 @@ rte_compressdev_pmd_parse_uint_arg(const char *key __rte_unused,
int i;
char *end;
+ if (value == NULL || extra_args == NULL)
+ return -EINVAL;
+
errno = 0;
i = strtol(value, &end, 10);
if (*end != 0 || errno != 0 || i < 0)
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。