git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b10ae8
)
bus/pci: fix memory leak when unmapping VFIO resource
author
Yunjian Wang
<wangyunjian@huawei.com>
Fri, 11 Sep 2020 10:57:42 +0000
(18:57 +0800)
committer
David Marchand
<david.marchand@redhat.com>
Mon, 5 Oct 2020 08:08:57 +0000
(10:08 +0200)
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>
drivers/bus/pci/linux/pci_vfio.c
patch
|
blob
|
history
diff --git
a/drivers/bus/pci/linux/pci_vfio.c
b/drivers/bus/pci/linux/pci_vfio.c
index
d207399
..
940ebc1
100644
(file)
--- a/
drivers/bus/pci/linux/pci_vfio.c
+++ b/
drivers/bus/pci/linux/pci_vfio.c
@@
-1015,7
+1015,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;
}