[dpdk-stable] patch 'net/mlx4: fix drop queue error handling' has been queued to LTS release 18.11.9

Kevin Traynor ktraynor at redhat.com
Fri Jun 5 20:24:42 CEST 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.9

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

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

Thanks.

Kevin.

---
>From 4b16538be8008edf9d556f159862b1abb42e8610 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba at mellanox.com>
Date: Wed, 6 May 2020 16:27:54 +0000
Subject: [PATCH] net/mlx4: fix drop queue error handling
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 6f155c0b9de5a58b5653d3e81c553564984f3c36 ]

The function mlx4_drop_get() creates pointer to a struct mlx4_drop and
if needed allocates by rte_malloc.

If the allocation is failed the function goes to label “error”, and
there does dereference to a null pointer.

Skip resources cleaning when the memory allocation is failed.

Coverity issue: 146206
Coverity issue: 146146
Fixes: d3a7e09234e4 ("net/mlx4: allocate drop flow resources on demand")

Signed-off-by: Michael Baum <michaelba at mellanox.com>
Acked-by: Matan Azrad <matan at mellanox.com>
---
 drivers/net/mlx4/mlx4_flow.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c
index 5136d136ff..dfdc790aaf 100644
--- a/drivers/net/mlx4/mlx4_flow.c
+++ b/drivers/net/mlx4/mlx4_flow.c
@@ -977,10 +977,11 @@ mlx4_drop_get(struct mlx4_priv *priv)
 	return drop;
 error:
-	if (drop->qp)
-		claim_zero(mlx4_glue->destroy_qp(drop->qp));
-	if (drop->cq)
-		claim_zero(mlx4_glue->destroy_cq(drop->cq));
-	if (drop)
+	if (drop) {
+		if (drop->qp)
+			claim_zero(mlx4_glue->destroy_qp(drop->qp));
+		if (drop->cq)
+			claim_zero(mlx4_glue->destroy_cq(drop->cq));
 		rte_free(drop);
+	}
 	rte_errno = ENOMEM;
 	return NULL;
-- 
2.21.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-06-05 19:20:53.300923714 +0100
+++ 0045-net-mlx4-fix-drop-queue-error-handling.patch	2020-06-05 19:20:50.824040495 +0100
@@ -1 +1 @@
-From 6f155c0b9de5a58b5653d3e81c553564984f3c36 Mon Sep 17 00:00:00 2001
+From 4b16538be8008edf9d556f159862b1abb42e8610 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 6f155c0b9de5a58b5653d3e81c553564984f3c36 ]
+
@@ -20 +21,0 @@
-Cc: stable at dpdk.org
@@ -29 +30 @@
-index 793f0b090e..2a86382db7 100644
+index 5136d136ff..dfdc790aaf 100644
@@ -32 +33 @@
-@@ -981,10 +981,11 @@ mlx4_drop_get(struct mlx4_priv *priv)
+@@ -977,10 +977,11 @@ mlx4_drop_get(struct mlx4_priv *priv)



More information about the stable mailing list