From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D1A4641D4F for ; Thu, 23 Feb 2023 10:37:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CE4644318C; Thu, 23 Feb 2023 10:37:44 +0100 (CET) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by mails.dpdk.org (Postfix) with ESMTP id BE2AF4318C for ; Thu, 23 Feb 2023 10:37:43 +0100 (CET) Received: by mail-wr1-f52.google.com with SMTP id bt28so3470672wrb.8 for ; Thu, 23 Feb 2023 01:37:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MuZMQ1Eec6j2arZL13H5YJHofZlnUbnCPgjNvj6qQd0=; b=AukcjzBQxGZxk1tIOpHmZaZOD07tZKvHXD8FzCWVS+ICEbeqCNvhQXaPL4AIXePD2e O7Erxx3r+18YC/xhcXbehMHnVJTc8V52hBUtSwxPjgD3DNxzm5iLUK82SqP96TapnMR9 Wce3Vx7YHijf3vVS6F/v+zVeWamkXbhYX9oZyMcfx0tYkmObkDY+yJDWq28w5MsLkqSu k2FJc1IT0yfgjoSVhXW9hTi9nKUT5C2ocdvUncPxdYIej0VHJJzGo9oq6QbbN2yR+ABc qMQ3Z5HxsHPhiiO20UOovZZ+2TKO/+8OgLVVV7q/54zbGuF/zF6FPcuGLB528b47CYBS jTCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MuZMQ1Eec6j2arZL13H5YJHofZlnUbnCPgjNvj6qQd0=; b=Q/bRAIQj+Ea6vS0/16zb56ijzbGZUEzufD0hkW8GR1eViJc1U/BoaLznEttfhXZguc FoBnvj6xEu0mJwLGGNJFExDBcp9LZV58lToOpIsxARERny8jqNd2tlB2PO0DClr1sZ0f O+ghY1RAESIfbcGZYgH5BdDmIJDhRuv/2zFKponKbKENiz+BsEZHzS4mZxj3FEHB1ewO VqRb4OjFN/NgTopmgXuqdyZaeUErjsPbaVZ/LkvhhdulmXJ1QntLrWMTpLa6lD0aasqc 0YmmwJVx4KezYDw2jbIBEQzV44QU/J7SR6KYMOWnPdXQdZvbfTWjw2HR4O+Z7ti8ZjhN XJEg== X-Gm-Message-State: AO0yUKW1w6el1S98rrPpwqikGEWiYMph7eJ/Jf//NsllQdV1CIh1hZ4H N50U1IhQfR/Wqo00DYkktfaOJeaor+M= X-Google-Smtp-Source: AK7set8YEfR5kNcOixw+X7R6NpExxzWO+N6g9zyeTmhiL6RLfd3RoP6FXinGcgE0t/4Si3w9kS1Asg== X-Received: by 2002:a5d:6f15:0:b0:2c5:51a5:9ef8 with SMTP id ay21-20020a5d6f15000000b002c551a59ef8mr8452699wrb.8.1677145063469; Thu, 23 Feb 2023 01:37:43 -0800 (PST) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id o2-20020a5d4742000000b002c59c6abc10sm10289341wrs.115.2023.02.23.01.37.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 01:37:43 -0800 (PST) From: luca.boccassi@gmail.com To: David Marchand Cc: Kiran Kumar K , Jerin Jacob , dpdk stable Subject: patch 'graph: fix node shrink' has been queued to stable release 20.11.8 Date: Thu, 23 Feb 2023 09:36:13 +0000 Message-Id: <20230223093715.3926893-9-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230223093715.3926893-1-luca.boccassi@gmail.com> References: <20230223093715.3926893-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 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 Acked-by: Kiran Kumar K Acked-by: Jerin Jacob --- 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@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)