From: Ian Jackson Subject: Re: xl network-attach SEGV in 4.2 and 4.1 [and 1 more messages] Date: Thu, 18 Apr 2013 17:46:34 +0100 Message-ID: <20848.9066.319945.763227@mariner.uk.xensource.com> References: <516E0DCF.9090001@invisiblethingslab.com> <1366188196.8399.187.camel@zakaz.uk.xensource.com> <20848.6355.859738.100856@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20848.6355.859738.100856@mariner.uk.xensource.com>, <516E0DCF.9090001@invisiblethingslab.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: Marek Marczykowski Cc: Ian Campbell , Jan Beulich , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Marek Marczykowski writes ("[Xen-devel] xl network-attach SEGV in 4.2 and 4.1"): > 4.2 and 4.1 suffers from SEGV during xl network-attach in > libxl__device_nic_add. In 4.3-unstable it is fixed by: > 5420f2650 libxl: Set vfb and vkb devid if not done so by the caller > > So either the patch need to be backported to 4.1 and 4.2, or fixed by this one: > - ------ > libxl: Fix SEGV in network-attach I have applied this to 4.2 and 4.1. I had to fix up a conflict in 4.1 and also I fixed a whitespace bug. The patches as committed are below. > When "device/vif" directory exists but is empty l!=NULL, but nb==0, so > l[nb-1] is invalid. Add missing check. ... > if (!(l = libxl__xs_directory(gc, XBT_NULL, > - - libxl__sprintf(gc, "%s/device/vif", > dompath), &nb))) { > + libxl__sprintf(gc, "%s/device/vif", > dompath), &nb)) || > + nb == 0) { Something in the arrangements you used to prepare this patch linewrapped it _before you signed it_. Ian Jackson writes ("Re: [Xen-devel] xl network-attach SEGV in 4.2 and 4.1"): > Author: Ian Jackson > Date: Thu Apr 18 16:27:46 2013 +0100 > > libxl: Avoid realloc(,0) when libxl__xs_directory returns empty list IWBNI someone would review this and ack it; I'd like it to go into 4.1, 4.2 and unstable. Ian.