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; 5+ 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] 5+ messages in thread
[parent not found: <20200614140035.247D44C87@dpdk.org>]

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

Thread overview: 5+ 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
     [not found] <20200614140035.247D44C87@dpdk.org>
2020-06-29  9:56 ` [dpdk-dev] [PATCH] " 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).