[dpdk-stable] patch 'net/mlx5: fix Rx queue resource cleanup' has been queued to stable release 20.11.4
Xueming Li
xuemingl at nvidia.com
Wed Nov 10 07:30:59 CET 2021
Hi,
FYI, your patch has been queued to stable release 20.11.4
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/12/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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9820d23a935266e158b02e125e81b388ff4161bb
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From 9820d23a935266e158b02e125e81b388ff4161bb Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk at nvidia.com>
Date: Mon, 18 Oct 2021 20:24:56 +0300
Subject: [PATCH] net/mlx5: fix Rx queue resource cleanup
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit 9ec1ceab76a82bc7c95343ed99312893a66ce217 ]
mlx5_rxq_start() allocates rxq_ctrl->obj and frees it on failure,
but did not set it to NULL. Later mlx5_rxq_release() could not recognize
this object is already freed and attempted to release its resources,
resulting in a crash:
Configuring Port 0 (socket 0)
mlx5_common: Failed to create RQ using DevX
mlx5_common: Can't create DevX RQ object.
mlx5_net: Port 0 Rx queue 0 RQ creation failure.
Segmentation fault
Set rxq_ctrl->obj to NULL after it is freed to skip resource release.
Fixes: 1260a87b2889 ("net/mlx5: share Rx control code")
Signed-off-by: Dmitry Kozlyuk <dkozlyuk at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
drivers/net/mlx5/mlx5_trigger.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 33a98ee50c..98055efd50 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -180,6 +180,7 @@ mlx5_rxq_start(struct rte_eth_dev *dev)
ret = priv->obj_ops.rxq_obj_new(dev, i);
if (ret) {
mlx5_free(rxq_ctrl->obj);
+ rxq_ctrl->obj = NULL;
goto error;
}
DRV_LOG(DEBUG, "Port %u rxq %u updated with %p.",
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:09.703480734 +0800
+++ 0175-net-mlx5-fix-Rx-queue-resource-cleanup.patch 2021-11-10 14:17:01.987411803 +0800
@@ -1 +1 @@
-From 9ec1ceab76a82bc7c95343ed99312893a66ce217 Mon Sep 17 00:00:00 2001
+From 9820d23a935266e158b02e125e81b388ff4161bb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 9ec1ceab76a82bc7c95343ed99312893a66ce217 ]
@@ -20 +22,0 @@
-Cc: stable at dpdk.org
@@ -29 +31 @@
-index ca43bd51aa..dacf7ff272 100644
+index 33a98ee50c..98055efd50 100644
@@ -32 +34 @@
-@@ -230,6 +230,7 @@ mlx5_rxq_start(struct rte_eth_dev *dev)
+@@ -180,6 +180,7 @@ mlx5_rxq_start(struct rte_eth_dev *dev)
More information about the stable
mailing list