[dpdk-stable] patch 'graph: fix null dereference in stats' has been queued to stable release 20.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jul 12 15:03:57 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7af7de2a52cf4a8174bfe51a233a8b39a5bd12eb

Thanks.

Luca Boccassi

---
>From 7af7de2a52cf4a8174bfe51a233a8b39a5bd12eb Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3 at huawei.com>
Date: Thu, 6 May 2021 15:16:27 +0800
Subject: [PATCH] graph: fix null dereference in stats

[ upstream commit 2d2bf7de1afe750984073c4cc81ffa4d95550811 ]

In function 'stats_mem_init', pointer 'stats' should
be confirmed not null before memset it.

Fixes: af1ae8b6a32c ("graph: implement stats")

Signed-off-by: Hongbo Zheng <zhenghongbo3 at huawei.com>
Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
Reviewed-by: Jerin Jacob <jerinj at marvell.com>
Reviewed-by: David Marchand <david.marchand at redhat.com>
---
 lib/librte_graph/graph_stats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_graph/graph_stats.c b/lib/librte_graph/graph_stats.c
index 30e295d8b1..aa70929dc3 100644
--- a/lib/librte_graph/graph_stats.c
+++ b/lib/librte_graph/graph_stats.c
@@ -119,8 +119,8 @@ stats_mem_init(struct cluster *cluster,
 	cluster_node_size = RTE_ALIGN(cluster_node_size, RTE_CACHE_LINE_SIZE);
 
 	stats = realloc(NULL, sz);
-	memset(stats, 0, sz);
 	if (stats) {
+		memset(stats, 0, sz);
 		stats->fn = fn;
 		stats->cluster_node_size = cluster_node_size;
 		stats->max_nodes = 0;
-- 
2.30.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-07-12 13:41:37.022971247 +0100
+++ 0002-graph-fix-null-dereference-in-stats.patch	2021-07-12 13:41:36.150115528 +0100
@@ -1 +1 @@
-From 2d2bf7de1afe750984073c4cc81ffa4d95550811 Mon Sep 17 00:00:00 2001
+From 7af7de2a52cf4a8174bfe51a233a8b39a5bd12eb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2d2bf7de1afe750984073c4cc81ffa4d95550811 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -17 +18 @@
- lib/graph/graph_stats.c | 2 +-
+ lib/librte_graph/graph_stats.c | 2 +-
@@ -20 +21 @@
-diff --git a/lib/graph/graph_stats.c b/lib/graph/graph_stats.c
+diff --git a/lib/librte_graph/graph_stats.c b/lib/librte_graph/graph_stats.c
@@ -22,2 +23,2 @@
---- a/lib/graph/graph_stats.c
-+++ b/lib/graph/graph_stats.c
+--- a/lib/librte_graph/graph_stats.c
++++ b/lib/librte_graph/graph_stats.c


More information about the stable mailing list