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

Kevin Traynor ktraynor at redhat.com
Thu Feb 23 16:05:03 CET 2023


Hi,

FYI, your patch has been queued to stable release 21.11.4

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/28/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/kevintraynor/dpdk-stable

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

Thanks.

Kevin

---
>From e4609ddf51b496f1f60c26fb8a2581b9f4ea7189 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/graph/node.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/graph/node.c b/lib/graph/node.c
index 86ec4316f9..b7b83f761c 100644
--- a/lib/graph/node.c
+++ b/lib/graph/node.c
@@ -305,14 +305,14 @@ rte_node_edge_shrink(rte_node_t id, rte_edge_t size)
 			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 14:46:24.150864486 +0000
+++ 0012-graph-fix-node-shrink.patch	2023-02-23 14:46:23.712235764 +0000
@@ -1 +1 @@
-From 99cc0a9ab6730d4df70dba4b19e78e87ad7ba110 Mon Sep 17 00:00:00 2001
+From e4609ddf51b496f1f60c26fb8a2581b9f4ea7189 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 99cc0a9ab6730d4df70dba4b19e78e87ad7ba110 ]
+
@@ -9 +10,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index fc6345de07..149414dcd9 100644
+index 86ec4316f9..b7b83f761c 100644
@@ -22 +23 @@
-@@ -301,14 +301,14 @@ rte_node_edge_shrink(rte_node_t id, rte_edge_t size)
+@@ -305,14 +305,14 @@ rte_node_edge_shrink(rte_node_t id, rte_edge_t size)



More information about the stable mailing list