[dpdk-stable] patch 'net/mlx5: fix Tx queue release debug log timing' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 19 15:05:46 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.3

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

Thanks.

Luca Boccassi

---
>From 40a2233e7897b48d042bd59c90ba9c22e4788a59 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev at mellanox.com>
Date: Wed, 6 May 2020 18:10:59 +0000
Subject: [PATCH] net/mlx5: fix Tx queue release debug log timing

[ upstream commit 776aec28fc47dbf29466555b34cd79ab9cf7a7bc ]

Program received signal SIGSEGV, Segmentation fault.
0x00000000008ef7c4 in mlx5_tx_queue_release (dpdk_txq=0x17ce01680) at
drivers/net/mlx5/mlx5_txq.c:302
301 mlx5_txq_release(ETH_DEV(priv), i);
302 DRV_LOG(DEBUG, "port %u removing Tx queue %u from list",
303         PORT_ID(priv), txq->idx);
The problem is txq is freed inside the mlx5_txq_release() function
and no longer valid in the debug log right after this invocation.
Move the debug log before the mlx5_txq_release() function to fix this.

Fixes: a6d83b6a9209 ("net/mlx5: standardize on negative errno values")

Signed-off-by: Alexander Kozyrev <akozyrev at mellanox.com>
Acked-by: Matan Azrad <matan at mellanox.com>
---
 drivers/net/mlx5/mlx5_txq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 3e29613d4b..c7751e83c0 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -295,9 +295,9 @@ mlx5_tx_queue_release(void *dpdk_txq)
 	priv = txq_ctrl->priv;
 	for (i = 0; (i != priv->txqs_n); ++i)
 		if ((*priv->txqs)[i] == txq) {
-			mlx5_txq_release(ETH_DEV(priv), i);
 			DRV_LOG(DEBUG, "port %u removing Tx queue %u from list",
 				PORT_ID(priv), txq->idx);
+			mlx5_txq_release(ETH_DEV(priv), i);
 			break;
 		}
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:53.206934177 +0100
+++ 0211-net-mlx5-fix-Tx-queue-release-debug-log-timing.patch	2020-05-19 14:04:44.608655479 +0100
@@ -1,8 +1,10 @@
-From 776aec28fc47dbf29466555b34cd79ab9cf7a7bc Mon Sep 17 00:00:00 2001
+From 40a2233e7897b48d042bd59c90ba9c22e4788a59 Mon Sep 17 00:00:00 2001
 From: Alexander Kozyrev <akozyrev at mellanox.com>
 Date: Wed, 6 May 2020 18:10:59 +0000
 Subject: [PATCH] net/mlx5: fix Tx queue release debug log timing
 
+[ upstream commit 776aec28fc47dbf29466555b34cd79ab9cf7a7bc ]
+
 Program received signal SIGSEGV, Segmentation fault.
 0x00000000008ef7c4 in mlx5_tx_queue_release (dpdk_txq=0x17ce01680) at
 drivers/net/mlx5/mlx5_txq.c:302
@@ -14,7 +16,6 @@
 Move the debug log before the mlx5_txq_release() function to fix this.
 
 Fixes: a6d83b6a9209 ("net/mlx5: standardize on negative errno values")
-Cc: stable at dpdk.org
 
 Signed-off-by: Alexander Kozyrev <akozyrev at mellanox.com>
 Acked-by: Matan Azrad <matan at mellanox.com>
@@ -23,10 +24,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
-index 29e5cabab6..a211fa91b2 100644
+index 3e29613d4b..c7751e83c0 100644
 --- a/drivers/net/mlx5/mlx5_txq.c
 +++ b/drivers/net/mlx5/mlx5_txq.c
-@@ -298,9 +298,9 @@ mlx5_tx_queue_release(void *dpdk_txq)
+@@ -295,9 +295,9 @@ mlx5_tx_queue_release(void *dpdk_txq)
  	priv = txq_ctrl->priv;
  	for (i = 0; (i != priv->txqs_n); ++i)
  		if ((*priv->txqs)[i] == txq) {


More information about the stable mailing list