From: Ian Campbell Subject: Re: [PATCH] libxl: fix cleanup of tap devices in libxl__device_destroy Date: Thu, 2 Aug 2012 15:45:43 +0100 Message-ID: <1343918743.27221.164.camel@zakaz.uk.xensource.com> References: <1343900722.27221.107.camel@zakaz.uk.xensource.com> <20506.37349.96739.832156@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20506.37349.96739.832156@mariner.uk.xensource.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: Greg Wettstein , Roger Pau Monne , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Thu, 2012-08-02 at 15:42 +0100, Ian Jackson wrote: > Ian Campbell writes ("Re: [Xen-devel] [PATCH] libxl: fix cleanup of tap devices in libxl__device_destroy"): > > > > > rc = libxl__xs_transaction_start(gc, &t); > > > if (rc) goto out; > > > > > > + /* May not exist if this is not a tap device */ > > > + tapdisk_params = libxl__xs_read(gc, t, tapdisk_path); > > > + > > > libxl__xs_path_cleanup(gc, t, fe_path); > > > libxl__xs_path_cleanup(gc, t, be_path); > > > > Do we deliberate ignore the error codes from these two? > > I don't think so. > > In general in this destroy path we should consider whether, on > failure, we should abandon the cleanup or note the error and carry on. Since this is a destroy operation note it and carry on I think, so as to clean up as much as we are able. BTW, is there a libxl__xs_transaction_abort missing in this function too?