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

Xueming Li xuemingl at nvidia.com
Mon Feb 27 07:58:52 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.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 03/01/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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=5ef77a12217ad71734f44c8a84781f5a61cfb5ac

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 5ef77a12217ad71734f44c8a84781f5a61cfb5ac 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
Cc: Xueming Li <xuemingl at nvidia.com>

[ 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 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)
 		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.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-27 14:08:41.755061600 +0800
+++ 0025-graph-fix-node-shrink.patch	2023-02-27 14:08:40.739237000 +0800
@@ -1 +1 @@
-From 99cc0a9ab6730d4df70dba4b19e78e87ad7ba110 Mon Sep 17 00:00:00 2001
+From 5ef77a12217ad71734f44c8a84781f5a61cfb5ac Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 99cc0a9ab6730d4df70dba4b19e78e87ad7ba110 ]
@@ -9 +11,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list