From: Ian Campbell Subject: Re: [PATCH v2] libxl: Fix bug in libxl_cdrom_insert, make more robust against bad xenstore data Date: Tue, 27 Nov 2012 14:14:55 +0000 Message-ID: <1354025695.17985.36.camel@zakaz.uk.xensource.com> References: <54d1bcd211d14cfbae07.1353681656@elijah> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <54d1bcd211d14cfbae07.1353681656@elijah> 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: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Fri, 2012-11-23 at 14:40 +0000, George Dunlap wrote: > # HG changeset patch > # User George Dunlap > # Date 1353681608 0 > # Node ID 54d1bcd211d14cfbae0782f2bf04f8942c2eb726 > # Parent ae6fb202b233af815466055d9f1a635802a50855 > libxl: Fix bug in libxl_cdrom_insert, make more robust against bad xenstore data > > libxl_cdrom_insert was failing to initialize the backend type, > resulting in the wrong default backend. The result was not only that > the CD was not inserted properly, but also that some improper xenstore > entries were created, causing further block commands to fail. > > This patch fixes the bug by setting the disk backend type based on the > type of the existing device. > > It also makes the system more robust by checking to see that it has > got a valid path before proceeding to write a partial xenstore entry. > > v2: > - Remove the checks on read, pending a more robust fix in another patch. > > Signed-off-by: George Dunlap Acked + applied. Thanks.