[dpdk-stable] patch 'net/fm10k: fix memory leak when Tx thresh check fails' has been queued to LTS release 18.11.11

Kevin Traynor ktraynor at redhat.com
Thu Nov 5 13:40:00 CET 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.11

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/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/906e74e7c669decc8ef33f546156096cd090a4a8

Thanks.

Kevin.

---
>From 906e74e7c669decc8ef33f546156096cd090a4a8 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian at huawei.com>
Date: Wed, 7 Oct 2020 15:36:46 +0800
Subject: [PATCH] net/fm10k: fix memory leak when Tx thresh check fails

[ upstream commit 9e4f075bc500dafe4568edf99b9a1161b554316e ]

In fm10k_tx_queue_setup(), we allocate memory for the queue
structure but not released when Tx thresh check fails.

Fixes: 98068e0e044e ("fm10k: add Tx queue setup/release")

Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Acked-by: Xiao Wang <xiao.w.wang at intel.com>
---
 drivers/net/fm10k/fm10k_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 4b57a96c8b..71a3ebed9a 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -2045,6 +2045,8 @@ fm10k_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id,
 	q->tail_ptr = (volatile uint32_t *)
 		&((uint32_t *)hw->hw_addr)[FM10K_TDT(queue_id)];
-	if (handle_txconf(q, conf))
+	if (handle_txconf(q, conf)) {
+		rte_free(q);
 		return -EINVAL;
+	}
 
 	/* allocate memory for the software ring */
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-05 12:38:55.247358338 +0000
+++ 0053-net-fm10k-fix-memory-leak-when-Tx-thresh-check-fails.patch	2020-11-05 12:38:54.254896031 +0000
@@ -1 +1 @@
-From 9e4f075bc500dafe4568edf99b9a1161b554316e Mon Sep 17 00:00:00 2001
+From 906e74e7c669decc8ef33f546156096cd090a4a8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9e4f075bc500dafe4568edf99b9a1161b554316e ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 3096370718..c4a6fdf7f0 100644
+index 4b57a96c8b..71a3ebed9a 100644
@@ -22 +23 @@
-@@ -2025,6 +2025,8 @@ fm10k_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id,
+@@ -2045,6 +2045,8 @@ fm10k_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id,



More information about the stable mailing list