DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  [PATCH] vfio: fix mem leak when unmapping resource
@ 2020-06-14 13:59 Yunjian Wang
  2020-09-11 10:57 ` [dpdk-dev] [PATCH v2] " wangyunjian
  0 siblings, 1 reply; 4+ messages in thread
From: Yunjian Wang @ 2020-06-14 13:59 UTC (permalink / raw)
  To: dev; +Cc: anatoly.burakov, Yunjian Wang, stable

The 'vfio_res' is not freed when unmapping resource by primary process.
This leads to memory leak.

Fixes: ab53203e194b ("vfio: enable unmapping resource for secondary")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <yunjian.wang@foxmail.com>
---
 drivers/bus/pci/linux/pci_vfio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index 64cd84a68..bf4c3c1fa 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -966,6 +966,7 @@ pci_vfio_unmap_resource_primary(struct rte_pci_device *dev)
 	}
 
 	TAILQ_REMOVE(vfio_res_list, vfio_res, next);
+	rte_free(vfio_res);
 
 	return 0;
 }
-- 
2.18.1


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

* [dpdk-dev]  [PATCH v2] vfio: fix mem leak when unmapping resource
  2020-06-14 13:59 [dpdk-dev] [PATCH] vfio: fix mem leak when unmapping resource Yunjian Wang
@ 2020-09-11 10:57 ` wangyunjian
  2020-09-17 10:37   ` Burakov, Anatoly
  2020-10-05  8:13   ` David Marchand
  0 siblings, 2 replies; 4+ messages in thread
From: wangyunjian @ 2020-09-11 10:57 UTC (permalink / raw)
  To: dev
  Cc: anatoly.burakov, ferruh.yigit, david.marchand, jerry.lilijun,
	xudingke, Yunjian Wang, stable

From: Yunjian Wang <wangyunjian@huawei.com>

The 'vfio_res' is not freed when unmapping resource by primary process.
This leads to memory leak.

Fixes: ab53203e194b ("vfio: enable unmapping resource for secondary")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
v2:
   Update email address
---
 drivers/bus/pci/linux/pci_vfio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index c15ed3bad..91131ce6a 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -1003,7 +1003,7 @@ pci_vfio_unmap_resource_primary(struct rte_pci_device *dev)
 	}
 
 	TAILQ_REMOVE(vfio_res_list, vfio_res, next);
-
+	rte_free(vfio_res);
 	return 0;
 }
 
-- 
2.23.0


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

* Re: [dpdk-dev] [PATCH v2] vfio: fix mem leak when unmapping resource
  2020-09-11 10:57 ` [dpdk-dev] [PATCH v2] " wangyunjian
@ 2020-09-17 10:37   ` Burakov, Anatoly
  2020-10-05  8:13   ` David Marchand
  1 sibling, 0 replies; 4+ messages in thread
From: Burakov, Anatoly @ 2020-09-17 10:37 UTC (permalink / raw)
  To: wangyunjian, dev
  Cc: ferruh.yigit, david.marchand, jerry.lilijun, xudingke, stable

On 11-Sep-20 11:57 AM, wangyunjian wrote:
> From: Yunjian Wang <wangyunjian@huawei.com>
> 
> The 'vfio_res' is not freed when unmapping resource by primary process.
> This leads to memory leak.
> 
> Fixes: ab53203e194b ("vfio: enable unmapping resource for secondary")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> ---

Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly

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

* Re: [dpdk-dev] [PATCH v2] vfio: fix mem leak when unmapping resource
  2020-09-11 10:57 ` [dpdk-dev] [PATCH v2] " wangyunjian
  2020-09-17 10:37   ` Burakov, Anatoly
@ 2020-10-05  8:13   ` David Marchand
  1 sibling, 0 replies; 4+ messages in thread
From: David Marchand @ 2020-10-05  8:13 UTC (permalink / raw)
  To: wangyunjian
  Cc: dev, Burakov, Anatoly, Yigit, Ferruh, Lilijun (Jerry),
	xudingke, dpdk stable

On Fri, Sep 11, 2020 at 12:58 PM wangyunjian <wangyunjian@huawei.com> wrote:
>
> From: Yunjian Wang <wangyunjian@huawei.com>
>
> The 'vfio_res' is not freed when unmapping resource by primary process.
> This leads to memory leak.
>
> Fixes: ab53203e194b ("vfio: enable unmapping resource for secondary")
> Cc: stable@dpdk.org
>
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>

Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

Applied, thanks.

-- 
David Marchand


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

end of thread, other threads:[~2020-10-05  8:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-14 13:59 [dpdk-dev] [PATCH] vfio: fix mem leak when unmapping resource Yunjian Wang
2020-09-11 10:57 ` [dpdk-dev] [PATCH v2] " wangyunjian
2020-09-17 10:37   ` Burakov, Anatoly
2020-10-05  8:13   ` David Marchand

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/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 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

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


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