From: Wei Liu Subject: Re: [PATCH 2/2] libxl: Avoid fd leak of qemu state fd during migration Date: Fri, 17 Oct 2014 13:38:25 +0100 Message-ID: <20141017123825.GE2844@zion.uk.xensource.com> References: <21566.40395.18224.864777@mariner.uk.xensource.com> <1413481453-25801-1-git-send-email-ian.jackson@eu.citrix.com> <1413481453-25801-2-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1413481453-25801-2-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: ian.campbell@eu.citrix.com, xen-devel@lists.xensource.com, Wei Liu List-Id: xen-devel@lists.xenproject.org On Thu, Oct 16, 2014 at 06:44:13PM +0100, Ian Jackson wrote: > In a long-running process (such as virt-manager) this might eventually > run the process out of fds. > > That qemu argument construction might generate an fd that needs to be > fed to qemu is a bit odd, but we just run with it and provide a > parameter to the qemu argument construction code for this purpose. > > There is no need to use the carefd machinery, because leaking the odd > copy of this descriptor into a child unexpectedly forked out of > another thread, is fine. We just don't want to leak it back to the > main process. > > Reported-by: ustermann.max@web.de > Signed-off-by: Ian Jackson The reasoning is sensible and the code looks correct. Reviewed-by: Wei Liu Wei.