[dpdk-stable] patch 'eal: fix leak on device event callback unregister' has been queued to stable release 19.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Nov 9 19:39:53 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.6

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/11/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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6461d31b0b5e9fe79121c1cde300c3e1a3b2a3e5

Thanks.

Luca Boccassi

---
>From 6461d31b0b5e9fe79121c1cde300c3e1a3b2a3e5 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian at huawei.com>
Date: Wed, 21 Oct 2020 19:19:03 +0800
Subject: [PATCH] eal: fix leak on device event callback unregister

[ upstream commit c78bd27d4b74a74261b180cb8d5421b919c1ab9a ]

The event_cb->dev_name is not freed when freeing event_cb,
and this causes a memory leak.

Fixes: a753e53d517b ("eal: add device event monitor framework")

Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Acked-by: Jeff Guo <jia.guo at intel.com>
Acked-by: David Marchand <david.marchand at redhat.com>
---
 lib/librte_eal/common/eal_common_dev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c
index 9e4f09d83e..363a2ca95e 100644
--- a/lib/librte_eal/common/eal_common_dev.c
+++ b/lib/librte_eal/common/eal_common_dev.c
@@ -526,6 +526,7 @@ rte_dev_event_callback_unregister(const char *device_name,
 		 */
 		if (event_cb->active == 0) {
 			TAILQ_REMOVE(&dev_event_cbs, event_cb, next);
+			free(event_cb->dev_name);
 			free(event_cb);
 			ret++;
 		} else {
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:11.423213542 +0000
+++ 0005-eal-fix-leak-on-device-event-callback-unregister.patch	2020-11-09 18:40:11.067310286 +0000
@@ -1 +1 @@
-From c78bd27d4b74a74261b180cb8d5421b919c1ab9a Mon Sep 17 00:00:00 2001
+From 6461d31b0b5e9fe79121c1cde300c3e1a3b2a3e5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c78bd27d4b74a74261b180cb8d5421b919c1ab9a ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list