From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] xl: Return an error if an empty file is passed to cd-insert Date: Thu, 30 May 2013 10:00:34 +0100 Message-ID: <1369904434.13087.43.camel@zakaz.uk.xensource.com> References: <1368526034-14449-1-git-send-email-george.dunlap@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1368526034-14449-1-git-send-email-george.dunlap@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: George Dunlap Cc: Ian Jackson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Tue, 2013-05-14 at 11:07 +0100, George Dunlap wrote: > Two changes: > * Stat the file before calling libxl_cdrom_insert() > * Return an error if anything fails (including libxl_cdrom_insert) > > This is in part to work around the fact that the RAW disk type > is used for things that aren't actually files; so we can't call > stat in libxl_device.c:libxl__device_disk_set_backend() because > it may be going over a remote protocol. > > v2: > - Avoid leaking buf > > Signed-off-by: George Dunlap Acked + applied, thanks. > + /* ATM the existence of the backing file is not checked for qdisk > + * in libxl_cdrom_insert() because RAW is used for remote > + * protocols as well as plain files. This will ideally be changed > + * for 4.4, but this work-around fixes the problem of "cd-insert" > + * returning success for non-existent files. */ Is this on your 4.4 list? Ian.