patch 'devargs: fix leak on hotplug failure' has been queued to stable release 21.11.2

Kevin Traynor ktraynor at redhat.com
Wed May 25 18:28:47 CEST 2022


Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/30/22. 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

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/214462a05b8e0cf08bbd06c10441d25baae17137

Thanks.

Kevin

---
>From 214462a05b8e0cf08bbd06c10441d25baae17137 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Thu, 14 Apr 2022 13:27:56 +0200
Subject: [PATCH] devargs: fix leak on hotplug failure

[ upstream commit 26d734b5d280b96f91f00f5e0c6c7eff99facef2 ]

Caught by ASan, if a secondary process tried to attach a device with an
incorrect driver name, devargs was leaked.

Fixes: 64051bb1f144 ("devargs: unify scratch buffer storage")

Signed-off-by: David Marchand <david.marchand at redhat.com>
---
 lib/eal/common/eal_common_dev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index e1e9976d8d..07f285f862 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -186,6 +186,8 @@ local_dev_probe(const char *devargs, struct rte_device **new_dev)
 
 err_devarg:
-	if (rte_devargs_remove(da) != 0)
+	if (rte_devargs_remove(da) != 0) {
 		rte_devargs_reset(da);
+		free(da);
+	}
 	return ret;
 }
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.849839718 +0100
+++ 0055-devargs-fix-leak-on-hotplug-failure.patch	2022-05-25 17:26:58.665828475 +0100
@@ -1 +1 @@
-From 26d734b5d280b96f91f00f5e0c6c7eff99facef2 Mon Sep 17 00:00:00 2001
+From 214462a05b8e0cf08bbd06c10441d25baae17137 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 26d734b5d280b96f91f00f5e0c6c7eff99facef2 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -18 +19 @@
-index c0ee4e442f..9d913e5478 100644
+index e1e9976d8d..07f285f862 100644
@@ -21 +22 @@
-@@ -181,6 +181,8 @@ local_dev_probe(const char *devargs, struct rte_device **new_dev)
+@@ -186,6 +186,8 @@ local_dev_probe(const char *devargs, struct rte_device **new_dev)



More information about the stable mailing list