From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] pci-attach: fix assertation Date: Wed, 16 Sep 2015 09:25:25 +0100 Message-ID: <1442391925.18856.23.camel@citrix.com> References: <1442384169-29059-1-git-send-email-cyliu@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1442384169-29059-1-git-send-email-cyliu@suse.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: Chunyan Liu , xen-devel@lists.xen.org Cc: wei.liu2@citrix.com, Ian.Jackson@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Wed, 2015-09-16 at 14:16 +0800, Chunyan Liu wrote: For the subject I prefer to avoid "fix " style messages. In this case something like "libxl: ensure xs transaction is initialised in libxl__device_pci_add_xenstore" would be better. > Run "xl pci-attach ", the 2nd time fails: > xl: libxl_xshelp.c:209: libxl__xs_transaction_start: Assertion `!*t' failed. > Aborted > > To fix that, initialize xs_transaction to avoid > libxl__xs_transaction_start assertation error. "assertion". > Signed-off-by: Chunyan Liu With an updated commit message (which I can do as I commit): Acked-by: Ian Campbell Wei, I think we want this for 4.6. Ian, tools/libxl/libxl_internal.h says to initialised the transaction to 0 rather than XBT_NULL explicitly -- I don't think there is a specific reason for that though? > --- > tools/libxl/libxl_pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c > index 1ebdce7..19c597e 100644 > --- a/tools/libxl/libxl_pci.c > +++ b/tools/libxl/libxl_pci.c > @@ -123,7 +123,7 @@ static int libxl__device_pci_add_xenstore(libxl__gc > *gc, uint32_t domid, libxl_d > flexarray_t *back; > char *num_devs, *be_path; > int num = 0; > - xs_transaction_t t; > + xs_transaction_t t = XBT_NULL; > libxl__device *device; > int rc; > libxl_domain_config d_config;