patch 'node: check Rx element allocation' has been queued to stable release 20.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Nov 3 10:27:58 CET 2022


Hi,

FYI, your patch has been queued to stable release 20.11.7

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

Thanks.

Luca Boccassi

---
>From cf01654a4a7d376605b282244cdb09753efb5ce9 Mon Sep 17 00:00:00 2001
From: Shiqi Liu <835703180 at qq.com>
Date: Thu, 7 Jul 2022 17:23:45 +0800
Subject: [PATCH] node: check Rx element allocation

[ upstream commit d914c01036f7ca9c5e01f899df5961865b604b66 ]

As the possible failure of the malloc(), the not_checked and
checked could be NULL pointer.
Therefore, it should be better to check it in order to avoid
the dereference of the NULL pointer.

Fixes: fa8054c8c889 ("examples/eventdev: add thread safe Tx worker pipeline")

Signed-off-by: Shiqi Liu <835703180 at qq.com>
---
 lib/librte_node/ethdev_ctrl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_node/ethdev_ctrl.c b/lib/librte_node/ethdev_ctrl.c
index 13b8b705f0..8a7429faa3 100644
--- a/lib/librte_node/ethdev_ctrl.c
+++ b/lib/librte_node/ethdev_ctrl.c
@@ -77,6 +77,8 @@ rte_node_eth_config(struct rte_node_ethdev_config *conf, uint16_t nb_confs,
 
 			/* Add it to list of ethdev rx nodes for lookup */
 			elem = malloc(sizeof(ethdev_rx_node_elem_t));
+			if (elem == NULL)
+				return -ENOMEM;
 			memset(elem, 0, sizeof(ethdev_rx_node_elem_t));
 			elem->ctx.port_id = port_id;
 			elem->ctx.queue_id = j;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-03 09:27:31.605765422 +0000
+++ 0100-node-check-Rx-element-allocation.patch	2022-11-03 09:27:25.569426235 +0000
@@ -1 +1 @@
-From d914c01036f7ca9c5e01f899df5961865b604b66 Mon Sep 17 00:00:00 2001
+From cf01654a4a7d376605b282244cdb09753efb5ce9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d914c01036f7ca9c5e01f899df5961865b604b66 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -16 +17 @@
- lib/node/ethdev_ctrl.c | 2 ++
+ lib/librte_node/ethdev_ctrl.c | 2 ++
@@ -19,4 +20,4 @@
-diff --git a/lib/node/ethdev_ctrl.c b/lib/node/ethdev_ctrl.c
-index 8d2e05a831..37df0431b8 100644
---- a/lib/node/ethdev_ctrl.c
-+++ b/lib/node/ethdev_ctrl.c
+diff --git a/lib/librte_node/ethdev_ctrl.c b/lib/librte_node/ethdev_ctrl.c
+index 13b8b705f0..8a7429faa3 100644
+--- a/lib/librte_node/ethdev_ctrl.c
++++ b/lib/librte_node/ethdev_ctrl.c


More information about the stable mailing list