[dpdk-stable] patch 'bus/pci: fix leak for unbound devices' has been queued to stable release 20.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jul 12 15:04:39 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.3

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

Thanks.

Luca Boccassi

---
>From dbf34013549a5e32691c90bdb84e80fffaf96868 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Wed, 16 Jun 2021 08:52:57 +0200
Subject: [PATCH] bus/pci: fix leak for unbound devices

[ upstream commit 7c83a1e3c83e601f449f05e2e36e1df50e8503aa ]

For devices not bound to any Linux kernel module, we leak a pci object
since it is never added to the PCI bus device list.

Fixes: c79a1c67465d ("bus/pci: optimize bus scan")

Reported-by: Owen Hilyard <ohilyard at iol.unh.edu>
Signed-off-by: David Marchand <david.marchand at redhat.com>
---
 drivers/bus/pci/linux/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index c5402b9652..e8d1faa4c9 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -331,7 +331,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
 		else
 			dev->kdrv = RTE_PCI_KDRV_UNKNOWN;
 	} else {
-		dev->kdrv = RTE_PCI_KDRV_NONE;
+		free(dev);
 		return 0;
 	}
 	/* device is valid, add in list (sorted) */
-- 
2.30.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-07-12 13:41:38.928118373 +0100
+++ 0044-bus-pci-fix-leak-for-unbound-devices.patch	2021-07-12 13:41:36.338119444 +0100
@@ -1 +1 @@
-From 7c83a1e3c83e601f449f05e2e36e1df50e8503aa Mon Sep 17 00:00:00 2001
+From dbf34013549a5e32691c90bdb84e80fffaf96868 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7c83a1e3c83e601f449f05e2e36e1df50e8503aa ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 80ffe7633a..4d261b55ee 100644
+index c5402b9652..e8d1faa4c9 100644
@@ -22 +23 @@
-@@ -327,7 +327,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
+@@ -331,7 +331,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)


More information about the stable mailing list