vfio: fix mem leak when unmapping resource
PATCH 1/1 vfio: fix mem leak when unmapping resource
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")
Signed-off-by Yunjian Wang <[email protected]>
--- drivers/bus/pci/linux/pci_vfio.c | 1 + 1 file changed, 1 insertion(+)
drivers/bus/pci/linux/pci_vfio.c +1 -0
@@ -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 ; }
Signature · 1 line
2.18.1
PATCH v2 1/1 vfio: fix mem leak when unmapping resource
From: Yunjian Wang <[email protected]>
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")
Signed-off-by Yunjian Wang <[email protected]>
---
v2:
Update email address
--- drivers/bus/pci/linux/pci_vfio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/pci/linux/pci_vfio.c +1 -1
@@ -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 ; }
Signature · 1 line
2.23.0
Quoted 10 lines · wangyunjian
From: Yunjian Wang <[email protected]>
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")Signed-off-by Yunjian Wang <[email protected]>---
Acked-by Anatoly Burakov <[email protected]>
Signature · 2 lines
Thanks, Anatoly
Quoted 10 lines · wangyunjian
From: Yunjian Wang <[email protected]>
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")Signed-off-by Yunjian Wang <[email protected]>
Acked-by Anatoly Burakov <[email protected]>
Applied, thanks.
Signature · 1 line
David Marchand