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

Kevin Traynor ktraynor at redhat.com
Wed Nov 18 17:35:26 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/24/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/fc06dbfb1cffe80a4cbc960197baae92415a2632

Thanks.

Kevin.

---
>From fc06dbfb1cffe80a4cbc960197baae92415a2632 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 dc2bc0c984..e0fabd3c12 100644
--- a/lib/librte_eal/common/eal_common_dev.c
+++ b/lib/librte_eal/common/eal_common_dev.c
@@ -527,4 +527,5 @@ 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++;
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.692864186 +0000
+++ 0040-eal-fix-leak-on-device-event-callback-unregister.patch	2020-11-18 16:33:37.939215068 +0000
@@ -1 +1 @@
-From c78bd27d4b74a74261b180cb8d5421b919c1ab9a Mon Sep 17 00:00:00 2001
+From fc06dbfb1cffe80a4cbc960197baae92415a2632 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c78bd27d4b74a74261b180cb8d5421b919c1ab9a ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 9e4f09d83e..363a2ca95e 100644
+index dc2bc0c984..e0fabd3c12 100644



More information about the stable mailing list