DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] bus/pci: fix leak for unbound devices
@ 2021-06-16  6:52 David Marchand
  2021-07-05  9:18 ` David Marchand
  2021-07-06 11:16 ` David Marchand
  0 siblings, 2 replies; 3+ messages in thread
From: David Marchand @ 2021-06-16  6:52 UTC (permalink / raw)
  To: dev; +Cc: grive, stable, Owen Hilyard, Jerin Jacob

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")
Cc: stable@dpdk.org

Reported-by: Owen Hilyard <ohilyard@iol.unh.edu>
Signed-off-by: David Marchand <david.marchand@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 0dc99e9cb2..5ea76bc867 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.23.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] bus/pci: fix leak for unbound devices
  2021-06-16  6:52 [dpdk-dev] [PATCH] bus/pci: fix leak for unbound devices David Marchand
@ 2021-07-05  9:18 ` David Marchand
  2021-07-06 11:16 ` David Marchand
  1 sibling, 0 replies; 3+ messages in thread
From: David Marchand @ 2021-07-05  9:18 UTC (permalink / raw)
  To: dev; +Cc: Gaetan Rivet, dpdk stable, Owen Hilyard, Jerin Jacob

On Wed, Jun 16, 2021 at 8:53 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> 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")
> Cc: stable@dpdk.org
>
> Reported-by: Owen Hilyard <ohilyard@iol.unh.edu>
> Signed-off-by: David Marchand <david.marchand@redhat.com>

No objection?
There is no dedicated maintainer, I'll merge this then.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] bus/pci: fix leak for unbound devices
  2021-06-16  6:52 [dpdk-dev] [PATCH] bus/pci: fix leak for unbound devices David Marchand
  2021-07-05  9:18 ` David Marchand
@ 2021-07-06 11:16 ` David Marchand
  1 sibling, 0 replies; 3+ messages in thread
From: David Marchand @ 2021-07-06 11:16 UTC (permalink / raw)
  To: dev; +Cc: Gaetan Rivet, dpdk stable, Owen Hilyard, Jerin Jacob

On Wed, Jun 16, 2021 at 8:53 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> 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")
> Cc: stable@dpdk.org
>
> Reported-by: Owen Hilyard <ohilyard@iol.unh.edu>
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Applied.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-06 11:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16  6:52 [dpdk-dev] [PATCH] bus/pci: fix leak for unbound devices David Marchand
2021-07-05  9:18 ` David Marchand
2021-07-06 11:16 ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).