[dpdk-stable] patch 'net/fm10k: fix memory leak when thresh check fails' has been queued to LTS release 18.11.11
Kevin Traynor
ktraynor at redhat.com
Thu Nov 5 13:39:36 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/79591394238421d9ae03c2863f25872e0a465c23
Thanks.
Kevin.
---
>From 79591394238421d9ae03c2863f25872e0a465c23 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian at huawei.com>
Date: Mon, 28 Sep 2020 20:44:42 +0800
Subject: [PATCH] net/fm10k: fix memory leak when thresh check fails
[ upstream commit c87a6de2a130c436fcf73b27f829c48e8249bcc4 ]
In fm10k_rx_queue_setup(), we allocate memory for the queue
structure but not released when thresh check fails.
Fixes: 6cfe8969c969 ("fm10k: add Rx queue setup/release")
Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
---
drivers/net/fm10k/fm10k_ethdev.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index f64d07bbad..4b57a96c8b 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -1862,7 +1862,8 @@ fm10k_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id,
&((uint32_t *)hw->hw_addr)[FM10K_RDT(queue_id)];
q->offloads = offloads;
- if (handle_rxconf(q, conf))
+ if (handle_rxconf(q, conf)) {
+ rte_free(q);
return -EINVAL;
-
+ }
/* allocate memory for the software ring */
q->sw_ring = rte_zmalloc_socket("fm10k sw ring",
--
2.26.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-11-05 12:38:54.807500839 +0000
+++ 0029-net-fm10k-fix-memory-leak-when-thresh-check-fails.patch 2020-11-05 12:38:54.210895996 +0000
@@ -1 +1 @@
-From c87a6de2a130c436fcf73b27f829c48e8249bcc4 Mon Sep 17 00:00:00 2001
+From 79591394238421d9ae03c2863f25872e0a465c23 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c87a6de2a130c436fcf73b27f829c48e8249bcc4 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 5771d83b55..98e396b8e7 100644
+index f64d07bbad..4b57a96c8b 100644
@@ -22 +23 @@
-@@ -1842,7 +1842,8 @@ fm10k_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id,
+@@ -1862,7 +1862,8 @@ fm10k_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id,
More information about the stable
mailing list