From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH] KVM: release anon file in failure path of vm creation Date: Fri, 15 Jul 2016 03:26:03 +0100 Message-ID: <20160715022603.GG14480@ZenIV.linux.org.uk> References: <1468316323-23835-1-git-send-email-shuo.a.liu@intel.com> <28049c2a-1b49-1909-52ce-105859e14e33@redhat.com> <20160714164647.GD14480@ZenIV.linux.org.uk> <20160715022204.GA16729@shuo-desktop.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Zhang Yanmin , He Bo , Liu Shuo , Radim =?utf-8?B?S3LEjW3DocWZ?= To: Liu Shuo Return-path: Content-Disposition: inline In-Reply-To: <20160715022204.GA16729@shuo-desktop.sh.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Fri, Jul 15, 2016 at 10:22:04AM +0800, Liu Shuo wrote: > > You have no warranty whatsoever that descriptor table has not been changed > > by that point. You should *NEVER* use sys_close() on failure exit paths > Could you please elaborate why we're not sure descriptor table's changing at the point? Because that could be called by one thread while another (having guessed the descriptor you are about to get) does close()/dup2()/etc.