代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/dpdk 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From d3078f7a0fe21d94fa8d6027f2541311a990585a Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 13 May 2022 10:53:57 +0800
Subject: [PATCH 095/122] net/cnxk: fix possible null dereference in telemetry
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The return value of rte_tel_data_alloc() may be null pointer.
Add missing check vs null.
Fixes: 5ea354a1f2cc ("net/cnxk: support telemetry")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
drivers/net/cnxk/cnxk_ethdev_telemetry.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/cnxk/cnxk_ethdev_telemetry.c b/drivers/net/cnxk/cnxk_ethdev_telemetry.c
index 83bc65848c..4fd9048643 100644
--- a/drivers/net/cnxk/cnxk_ethdev_telemetry.c
+++ b/drivers/net/cnxk/cnxk_ethdev_telemetry.c
@@ -49,6 +49,8 @@ ethdev_tel_handle_info(const char *cmd __rte_unused,
rte_tel_data_add_dict_int(d, "n_ports", n_ports);
i_data = rte_tel_data_alloc();
+ if (i_data == NULL)
+ return -ENOMEM;
rte_tel_data_start_array(i_data, RTE_TEL_U64_VAL);
for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
--
2.22.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。