patch 'net/dpaa2: fix null pointer dereference' has been queued to stable release 21.11.1

Kevin Traynor ktraynor at redhat.com
Mon Feb 21 16:35:16 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.11.1

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/26/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/9ac1343c4de9c2b4f093ab163b1a739d76dcaccf

Thanks.

Kevin

---
>From 9ac1343c4de9c2b4f093ab163b1a739d76dcaccf Mon Sep 17 00:00:00 2001
From: Weiguo Li <liwg06 at foxmail.com>
Date: Tue, 25 Jan 2022 22:23:48 +0800
Subject: [PATCH] net/dpaa2: fix null pointer dereference

[ upstream commit 29e5519dab554407f9d375abb40fdb57f8d445db ]

Check for memory allocation failure is added to avoid null
pointer dereference.

Fixes: 4690a6114ff6 ("net/dpaa2: enable error queues optionally")

Signed-off-by: Weiguo Li <liwg06 at foxmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 87a8a6e55e..b875139689 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -396,4 +396,6 @@ dpaa2_alloc_rx_tx_queues(struct rte_eth_dev *dev)
 		priv->rx_err_vq = rte_zmalloc("dpni_rx_err",
 			sizeof(struct dpaa2_queue), 0);
+		if (!priv->rx_err_vq)
+			goto fail;
 
 		dpaa2_q = (struct dpaa2_queue *)priv->rx_err_vq;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-02-21 15:22:47.348633247 +0000
+++ 0127-net-dpaa2-fix-null-pointer-dereference.patch	2022-02-21 15:22:44.255704495 +0000
@@ -1 +1 @@
-From 29e5519dab554407f9d375abb40fdb57f8d445db Mon Sep 17 00:00:00 2001
+From 9ac1343c4de9c2b4f093ab163b1a739d76dcaccf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 29e5519dab554407f9d375abb40fdb57f8d445db ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 09105f049e..379daec5f4 100644
+index 87a8a6e55e..b875139689 100644
@@ -22 +23 @@
-@@ -400,4 +400,6 @@ dpaa2_alloc_rx_tx_queues(struct rte_eth_dev *dev)
+@@ -396,4 +396,6 @@ dpaa2_alloc_rx_tx_queues(struct rte_eth_dev *dev)



More information about the stable mailing list