patch 'ethdev: fix possible null pointer access' has been queued to stable release 21.11.2

Kevin Traynor ktraynor at redhat.com
Thu Jun 9 13:36:13 CEST 2022


Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/22. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/c81b66e128a778261168988e06d667e1615bc6e7

Thanks.

Kevin

---
>From c81b66e128a778261168988e06d667e1615bc6e7 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen at huawei.com>
Date: Fri, 13 May 2022 10:53:56 +0800
Subject: [PATCH] ethdev: fix possible null pointer access
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 590e988fdfca241d810d6cc94098c223ccb7c737 ]

The rte_tel_data_alloc() may return NULL, so the caller should add
judgement for it.

Fixes: 083b0b310b19 ("ethdev: add common stats for telemetry")

Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
---
 lib/ethdev/rte_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 5846e35804..1704e852b5 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -6183,4 +6183,6 @@ eth_dev_add_port_queue_stats(struct rte_tel_data *d, uint64_t *q_stats,
 	int q;
 	struct rte_tel_data *q_data = rte_tel_data_alloc();
+	if (q_data == NULL)
+		return;
 	rte_tel_data_start_array(q_data, RTE_TEL_U64_VAL);
 	for (q = 0; q < RTE_ETHDEV_QUEUE_STAT_CNTRS; q++)
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.383100684 +0100
+++ 0026-ethdev-fix-possible-null-pointer-access.patch	2022-06-09 12:34:29.685980538 +0100
@@ -1 +1 @@
-From 590e988fdfca241d810d6cc94098c223ccb7c737 Mon Sep 17 00:00:00 2001
+From c81b66e128a778261168988e06d667e1615bc6e7 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 590e988fdfca241d810d6cc94098c223ccb7c737 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index dc47543e6b..a175867651 100644
+index 5846e35804..1704e852b5 100644
@@ -26 +27 @@
-@@ -5503,4 +5503,6 @@ eth_dev_add_port_queue_stats(struct rte_tel_data *d, uint64_t *q_stats,
+@@ -6183,4 +6183,6 @@ eth_dev_add_port_queue_stats(struct rte_tel_data *d, uint64_t *q_stats,



More information about the stable mailing list