[dpdk-stable] patch 'net/tap: fix memory leak when unregister intr handler' has been queued to LTS release 18.11.7

Kevin Traynor ktraynor at redhat.com
Fri Feb 14 18:03:13 CET 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.7

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/20/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/058e984cf3af93044abcb20b9ef96ff7224cdcf4

Thanks.

Kevin.

---
>From 058e984cf3af93044abcb20b9ef96ff7224cdcf4 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian at huawei.com>
Date: Tue, 21 Jan 2020 10:12:43 +0800
Subject: [PATCH] net/tap: fix memory leak when unregister intr handler

[ upstream commit c5f9911d34650768355573bc53e0b621760c4124 ]

The return check of function tap_lsc_intr_handle_set() is wrong, it should
be 0 or a positive number if success. So the intr_handle->intr_vec was not
been freed when tap_lsc_intr_handle_set() returned a positive number.

Fixes: 4870a8cdd968 ("net/tap: support Rx interrupt")

Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 drivers/net/tap/rte_eth_tap.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 775619331e..3a8aa44a73 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1523,6 +1523,9 @@ tap_intr_handle_set(struct rte_eth_dev *dev, int set)
 
 	err = tap_lsc_intr_handle_set(dev, set);
-	if (err)
+	if (err < 0) {
+		if (!set)
+			tap_rx_intr_vec_set(dev, 0);
 		return err;
+	}
 	err = tap_rx_intr_vec_set(dev, set);
 	if (err && set)
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:38.086448727 +0000
+++ 0019-net-tap-fix-memory-leak-when-unregister-intr-handler.patch	2020-02-14 17:02:36.953407896 +0000
@@ -1 +1 @@
-From c5f9911d34650768355573bc53e0b621760c4124 Mon Sep 17 00:00:00 2001
+From 058e984cf3af93044abcb20b9ef96ff7224cdcf4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c5f9911d34650768355573bc53e0b621760c4124 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index a13d8d50d7..05470a2115 100644
+index 775619331e..3a8aa44a73 100644
@@ -23 +24 @@
-@@ -1592,6 +1592,9 @@ tap_intr_handle_set(struct rte_eth_dev *dev, int set)
+@@ -1523,6 +1523,9 @@ tap_intr_handle_set(struct rte_eth_dev *dev, int set)



More information about the stable mailing list