[dpdk-stable] patch 'net/tap: fix memory leak when unregister intr handler' has been queued to stable release 19.11.1
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Tue Feb 11 12:21:27 CET 2020
Hi,
FYI, your patch has been queued to stable release 19.11.1
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/13/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 6ea30d320353c3d1e047f59847928296db15acce 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 a13d8d50d7..05470a2115 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1591,8 +1591,11 @@ tap_intr_handle_set(struct rte_eth_dev *dev, int set)
int err;
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)
tap_lsc_intr_handle_set(dev, 0);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.557789119 +0000
+++ 0141-net-tap-fix-memory-leak-when-unregister-intr-handler.patch 2020-02-11 11:17:38.652006059 +0000
@@ -1,14 +1,15 @@
-From c5f9911d34650768355573bc53e0b621760c4124 Mon Sep 17 00:00:00 2001
+From 6ea30d320353c3d1e047f59847928296db15acce 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")
-Cc: stable at dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit at intel.com>
More information about the stable
mailing list