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