patch 'graph: fix node shrink' has been queued to stable release 20.11.8

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Feb 23 10:36:13 CET 2023


Hi,

FYI, your patch has been queued to stable release 20.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/23. 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/5354cee5a09ad5083b9e0e034c4ce9a0bc04c26c

Thanks.

Luca Boccassi

---
>From 5354cee5a09ad5083b9e0e034c4ce9a0bc04c26c Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Thu, 19 Jan 2023 11:32:34 +0100
Subject: [PATCH] graph: fix node shrink

[ upstream commit 99cc0a9ab6730d4df70dba4b19e78e87ad7ba110 ]

If the node id check failed, graph_lock was not taken before releasing.

Fixes: c59dac2ca14a ("graph: implement node operations")

Signed-off-by: David Marchand <david.marchand at redhat.com>
Acked-by: Kiran Kumar K <kirankumark at marvell.com>
Acked-by: Jerin Jacob <jerinj at marvell.com>
---
 lib/librte_graph/node.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_graph/node.c b/lib/librte_graph/node.c
index 873c9ab16d..ecbc4e5504 100644
--- a/lib/librte_graph/node.c
+++ b/lib/librte_graph/node.c
@@ -310,16 +310,16 @@ rte_node_edge_shrink(rte_node_t id, rte_edge_t size)
 		if (node->id == id) {
 			if (node->nb_edges < size) {
 				rte_errno = E2BIG;
-				goto fail;
+			} else {
+				node->nb_edges = size;
+				rc = size;
 			}
-			node->nb_edges = size;
-			rc = size;
 			break;
 		}
 	}
 
-fail:
 	graph_spinlock_unlock();
+fail:
 	return rc;
 }
 
-- 
2.39.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-23 09:36:28.670013783 +0000
+++ 0009-graph-fix-node-shrink.patch	2023-02-23 09:36:28.174168983 +0000
@@ -1 +1 @@
-From 99cc0a9ab6730d4df70dba4b19e78e87ad7ba110 Mon Sep 17 00:00:00 2001
+From 5354cee5a09ad5083b9e0e034c4ce9a0bc04c26c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 99cc0a9ab6730d4df70dba4b19e78e87ad7ba110 ]
+
@@ -9 +10,0 @@
-Cc: stable at dpdk.org
@@ -15 +16 @@
- lib/graph/node.c | 8 ++++----
+ lib/librte_graph/node.c | 8 ++++----
@@ -18,5 +19,5 @@
-diff --git a/lib/graph/node.c b/lib/graph/node.c
-index fc6345de07..149414dcd9 100644
---- a/lib/graph/node.c
-+++ b/lib/graph/node.c
-@@ -300,16 +300,16 @@ rte_node_edge_shrink(rte_node_t id, rte_edge_t size)
+diff --git a/lib/librte_graph/node.c b/lib/librte_graph/node.c
+index 873c9ab16d..ecbc4e5504 100644
+--- a/lib/librte_graph/node.c
++++ b/lib/librte_graph/node.c
+@@ -310,16 +310,16 @@ rte_node_edge_shrink(rte_node_t id, rte_edge_t size)


More information about the stable mailing list