patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] bus/pci: fix leak for unbound devices
@ 2021-06-16  6:52 David Marchand
  2021-07-05  9:18 ` [dpdk-stable] [dpdk-dev] " 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-stable] [dpdk-dev] [PATCH] bus/pci: fix leak for unbound devices
  2021-06-16  6:52 [dpdk-stable] [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-stable] [dpdk-dev] [PATCH] bus/pci: fix leak for unbound devices
  2021-06-16  6:52 [dpdk-stable] [PATCH] bus/pci: fix leak for unbound devices David Marchand
  2021-07-05  9:18 ` [dpdk-stable] [dpdk-dev] " 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-stable] [PATCH] bus/pci: fix leak for unbound devices David Marchand
2021-07-05  9:18 ` [dpdk-stable] [dpdk-dev] " David Marchand
2021-07-06 11:16 ` David Marchand

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git