From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id 3A1F4C44C for ; Fri, 19 Feb 2016 16:10:07 +0100 (CET) Received: by mail-wm0-f54.google.com with SMTP id a4so75003998wme.1 for ; Fri, 19 Feb 2016 07:10:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=UjcPtqTF/Uw0xZgUyJcu63bxRP8Zr3gZNCr3NCb/FXw=; b=yvCafmb4/nQNOP5YIlfLIcs4KMZV9HEDhO5Ro3dID3BeLlcuG8dEUr4aS1yW5B4JoL eG3WpUvncnEMQQ321NBZjSphOkj6bz0/H7J2YrSbpuKTTG6QPV+sk4AaTa+aCQ4Wnr02 ucerx6Lr01l4iWlsJHVClRmWVv8Y0MFEr8PSYtyD/6lJH3btmtCE3FtBIP3VTUMavWeD 5g22C446z4hhynbE3MTLjFxNXamEJlvbMuwVDrAb4K63J7VzATZhFAJc6GRxp3/NfdSa LxvnOmbrIvPleHAZRBq6DNMGk3PK5tV3cWAhiZPaStkulCAW8JmJx0c6rhwNoTL8xXOC hDfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=UjcPtqTF/Uw0xZgUyJcu63bxRP8Zr3gZNCr3NCb/FXw=; b=VaAWgduGh337fr3z12HaNNikptP5CTtDjgaEpeU9ck7wbVMGBL53f34mx9QMT0bm3z aahWvvaQoeOnTdT9BXnCPKewiPH+mpf9/V8MUUkk5aEcGRqMEwacyDUtKO0VCvCTrJcW y51CCcke9cQfoA8sjET1qpRtaaqaYgOr6ptwnMQWMJe3eLYG6BTvOgpmUDgA1vwhEsVF wK7iSdA3m8gcxDkVU0LemHAWvClOX4aZ3h62SIcvd5qOlucXPJl8slnzPpaJt7RB3LuL wTlg4pb14B1tiHsFn5B3r1tMxLDGVDlq9Yw5nWGytkhFdChPaltS0+Bjut2kr1LOctM5 4s1g== X-Gm-Message-State: AG10YOS8zxVq4sji0Aw8gRhqUTdg9zcrXz1k/zw961wqiejSCR/lIYXq1dELOxag3ZU4pWAg X-Received: by 10.28.129.194 with SMTP id c185mr9962825wmd.29.1455894607087; Fri, 19 Feb 2016 07:10:07 -0800 (PST) Received: from xps13.localnet (111.204.154.77.rev.sfr.net. [77.154.204.111]) by smtp.gmail.com with ESMTPSA id z65sm7335709wmg.1.2016.02.19.07.10.05 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 19 Feb 2016 07:10:06 -0800 (PST) From: Thomas Monjalon To: Rich Lane Date: Fri, 19 Feb 2016 16:08:32 +0100 Message-ID: <14867543.eEYu7dpNMI@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1455129655-25520-1-git-send-email-rlane@bigswitch.com> References: <1453060638-58510-1-git-send-email-rlane@bigswitch.com> <1455129655-25520-1-git-send-email-rlane@bigswitch.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v3] vhost: fix leak of fds and mmaps X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2016 15:10:07 -0000 2016-02-10 10:40, Rich Lane: > The common vhost code only supported a single mmap per device. vhost-user > worked around this by saving the address/length/fd of each mmap after the end > of the rte_virtio_memory struct. This only works if the vhost-user code frees > dev->mem, since the common code is unaware of the extra info. The > VHOST_USER_RESET_OWNER message is one situation where the common code frees > dev->mem and leaks the fds and mappings. This happens every time I shut down a > VM. > > The new code calls back into the implementation (vhost-user or vhost-cuse) to > clean up these resources. > > The vhost-cuse changes are only compile tested. > > Signed-off-by: Rich Lane > Acked-by: Yuanhan Liu Applied, thanks