[dpdk-stable] patch 'net/mlx5: validate hash Rx queue pointer' has been queued to stable release 20.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Feb 9 11:35:24 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.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/11/21. 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/b7a6f0c9edf0f660bff5951095452c67a21e9de8

Thanks.

Luca Boccassi

---
>From b7a6f0c9edf0f660bff5951095452c67a21e9de8 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp at nvidia.com>
Date: Wed, 3 Feb 2021 12:09:09 +0200
Subject: [PATCH] net/mlx5: validate hash Rx queue pointer

[ upstream commit 207b4d06c33896ac723139b3af62bf710ce082f9 ]

Implementation of mlx5_hrxq_get() tries to get pointer to a hrxq
object, by reusing an existing hrxq, or creating a new one.
There is no check of the obtained pointer, so using it might result
in error.

This patch adds check of the pointer before using it, and return 0
if the pointer is NULL to indicate error.

Fixes: e1592b6c4dea ("net/mlx5: make Rx queue thread safe")

Signed-off-by: Dekel Peled <dekelp at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index e4cbe6430b..1a5cf99d51 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -2424,7 +2424,9 @@ uint32_t mlx5_hrxq_get(struct rte_eth_dev *dev,
 			return 0;
 		hrxq = container_of(entry, typeof(*hrxq), entry);
 	}
-	return hrxq->idx;
+	if (hrxq)
+		return hrxq->idx;
+	return 0;
 }
 
 /**
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.970099667 +0000
+++ 0026-net-mlx5-validate-hash-Rx-queue-pointer.patch	2021-02-09 10:34:57.942584623 +0000
@@ -1 +1 @@
-From 207b4d06c33896ac723139b3af62bf710ce082f9 Mon Sep 17 00:00:00 2001
+From b7a6f0c9edf0f660bff5951095452c67a21e9de8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 207b4d06c33896ac723139b3af62bf710ce082f9 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index 92e3a792e1..8f9ee97f7a 100644
+index e4cbe6430b..1a5cf99d51 100644
@@ -27 +28 @@
-@@ -2353,7 +2353,9 @@ uint32_t mlx5_hrxq_get(struct rte_eth_dev *dev,
+@@ -2424,7 +2424,9 @@ uint32_t mlx5_hrxq_get(struct rte_eth_dev *dev,


More information about the stable mailing list