From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f196.google.com (mail-pf0-f196.google.com [209.85.192.196]) by dpdk.org (Postfix) with ESMTP id C453437A0 for ; Tue, 20 Jun 2017 13:38:31 +0200 (CEST) Received: by mail-pf0-f196.google.com with SMTP id s66so22257774pfs.2 for ; Tue, 20 Jun 2017 04:38:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zjXQYYEJhpPs+8loBwNp4T070qC0104Ji9CcPcxvQks=; b=hB2x1yutjjZdcobSbNb/XShEqDh3RaJ943oKK8o8sSf5XkrcTzC+gjaWGaycbZ0Sgv eEArwoXQcnU4eF2PqbMtYZFwcueUtMY6vfnzMQDgd8V/4NLtpsuX5F3ZrXNtuxps0dOv jW0e42JOVP9dqwI3IQbXDhw2kicwkn4meYogPK6+IYSfGVCy5c+U2KtLzP2++XqCUFZQ ltICbDOeI1eNXCwugIhIfGh7eO4NkUFJV5vePVMbq4EvQbe0WFh1hfXs5YJ7AF0q0UIe lvVBtWP/C0MSDRtsu7MB875/JNsg/gQk/UCA2ckMDrJs5dw/xoVTaHUzM1BOh76xz16f b8dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zjXQYYEJhpPs+8loBwNp4T070qC0104Ji9CcPcxvQks=; b=IfHJuknTyvGi7DPkZM+tQCChfy6vCRRVA4RgyV95610JIfEXENJLPlTScgkytJ0HSe reJDvnveggqylceor56By9VevKxmalujyLoeihoed/XpCTFEcCRIXJGb072lf2+HKrye J1nK/0jzSyEf2phwjKnZsvm9VxzdihpkbrqDIb1Rz0RS1Hh9o62m971ChVFM1+3EPAEU oyyrWGsbjpUQh5DO5nHOu9wgdm5zntv3XbAm4JjZzO6gravTcC0/JgL3aaAKgxE4rvdN Y7sLbYTUwNjWt7VjK0X+uSdJMtT8WXyikzd9OmxODpx4gT77h9OgCb0ljFI0nKGi0YKs e/wg== X-Gm-Message-State: AKS2vOyEuU+SwzBMeHI/utIWzI1dbq7dxzALGo6JjyEJ7f34E9nPFS+F RuFhOavBwehODQYI X-Received: by 10.99.178.16 with SMTP id x16mr30585482pge.220.1497958711124; Tue, 20 Jun 2017 04:38:31 -0700 (PDT) Received: from yliu-home.localdomain ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id 25sm6104783pfj.59.2017.06.20.04.38.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2017 04:38:30 -0700 (PDT) From: Yuanhan Liu To: Dariusz Stojaczyk Cc: Jens Freimann , Yuanhan Liu , dpdk stable Date: Tue, 20 Jun 2017 19:35:47 +0800 Message-Id: <1497958550-13600-35-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497958550-13600-1-git-send-email-yliu@fridaylinux.org> References: <1497958550-13600-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'vhost: fix guest pages memory leak' has been queued to stable release 17.05.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 11:38:32 -0000 Hi, FYI, your patch has been queued to stable release 17.05.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/22/17. So please shout if anyone has objections. Thanks. --yliu --- >>From 217aa8e324d0ef96a8ed785cddb03b3fbc93aad0 Mon Sep 17 00:00:00 2001 From: Dariusz Stojaczyk 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 Reviewed-by: Jens Freimann Acked-by: Yuanhan Liu --- 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 5c8058b..2cc0b66 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -114,6 +114,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