[dpdk-stable] patch 'vhost: fix guest pages memory leak' has been queued to LTS release 16.11.3
Yuanhan Liu
yliu at fridaylinux.org
Fri Jul 14 12:33:39 CEST 2017
Hi,
FYI, your patch has been queued to LTS release 16.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/19/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From bfbcbaa68dee163c153b2f26bf61729af6b53c41 Mon Sep 17 00:00:00 2001
From: Dariusz Stojaczyk <dariuszx.stojaczyk at intel.com>
Date: Fri, 26 May 2017 13:59:14 +0200
Subject: [PATCH] vhost: fix guest pages memory leak
[ upstream commit 29c7c2fdaa4e88eebee6e3abaa15858d9616b1aa ]
This patch fixes a memory leak.
virtio_net::guest_pages is allocated in vhost_setup_mem_table(),
reallocated in add_one_guest_page(), but never freed.
Fixes: e246896178e6 ("vhost: get guest/host physical address mappings")
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk at intel.com>
Reviewed-by: Jens Freimann <jfreiman at redhat.com>
Acked-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
---
lib/librte_vhost/vhost_user.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 0cb1c67..d25e1c0 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -110,6 +110,10 @@ vhost_backend_cleanup(struct virtio_net *dev)
rte_free(dev->mem);
dev->mem = NULL;
}
+
+ free(dev->guest_pages);
+ dev->guest_pages = NULL;
+
if (dev->log_addr) {
munmap((void *)(uintptr_t)dev->log_addr, dev->log_size);
dev->log_addr = 0;
--
2.7.4
More information about the stable
mailing list