From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by dpdk.org (Postfix) with ESMTP id EC9922BAA for ; Fri, 14 Jul 2017 12:35:33 +0200 (CEST) Received: by mail-pf0-f193.google.com with SMTP id c24so10585620pfe.1 for ; Fri, 14 Jul 2017 03:35:33 -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=mCtARb0/2VUcGJvWSuw1bW1NPnGiJqm0YBB7rXDYlsU=; b=jjmaiAIayGfOPxqpuEZCjrWglgcaoMkCdSXZSZ27hIYwIk79/hwviYVuYliXYjgy6p yStOa4NYVBSiOdrs99YuiTQA7PqrrVe6lBool+C4ycwkKFbOWzWX30FHx5pa3Ao6xWBW 0hjWi3lV7qQtpGPKNHy4iw6dbey43BOEAVXRLaedrYSIQHKgPC5xP2jgNYclpAFW9vhu c79A+2ghmOsVwnYlk9USVbYJG33rRLk79Hc57Cskxr6fU2CYYOv/LdDhTEvB1MWJcr3/ 2vp/PEWkHDtYJxm1RX5beaJ8CLjp3l8yonhkhZB4CTXq6dCSgWnGwu769XkXVJJjjYJK vozw== 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=mCtARb0/2VUcGJvWSuw1bW1NPnGiJqm0YBB7rXDYlsU=; b=JCiRyIBzni+09waLd1vuYKtVwxx2qbQGD5dIIk8Aytvbt2xEDM5OCoIilsI/Vfe8BG /NilKRXNhONvuFoVkNbJjEa69cTnZjRw3fNzj00HD+qjCBjJ4Z1boE9/vdkC8EFAA+G1 miMGIf6bCLYVT45tGik7jemx9FcmL9G0bSJE3U4JlYO6OZTz0TEcI/RdmlQHPyx+O0gE RoT7uJWxlFeL/aMOl7IBXpDoDHt36JT/WIdmcD2F11RIxyOZXPZ8vrTktIXKp11neCla 40RAiSwcK3mvu/iDa5ozWb8+0IYf2mqdVarEmwo1pYBsROJh83xFVoDJfIivrm30cJof CElQ== X-Gm-Message-State: AIVw111znSuAkJNrqRdAFse01xrXNkGzc1Bw1JB0uU15Gf60h6BwyLzn +XsZjbaYCsF3vXI4 X-Received: by 10.84.142.1 with SMTP id 1mr15389058plw.130.1500028533317; Fri, 14 Jul 2017 03:35:33 -0700 (PDT) Received: from localhost.localdomain ([180.158.48.171]) by smtp.gmail.com with ESMTPSA id y205sm15273553pfb.124.2017.07.14.03.35.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Jul 2017 03:35:32 -0700 (PDT) From: Yuanhan Liu To: Dariusz Stojaczyk Cc: Jens Freimann , Yuanhan Liu , dpdk stable Date: Fri, 14 Jul 2017 18:33:39 +0800 Message-Id: <1500028450-25989-15-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500028450-25989-1-git-send-email-yliu@fridaylinux.org> References: <1500028450-25989-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'vhost: fix guest pages memory leak' has been queued to LTS release 16.11.3 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: Fri, 14 Jul 2017 10:35:34 -0000 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 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 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