xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Chunyan Liu <cyliu@suse.com>, xen-devel@lists.xen.org
Cc: wei.liu2@citrix.com, Ian.Jackson@eu.citrix.com
Subject: Re: [PATCH] pci-attach: fix assertation
Date: Wed, 16 Sep 2015 09:25:25 +0100	[thread overview]
Message-ID: <1442391925.18856.23.camel@citrix.com> (raw)
In-Reply-To: <1442384169-29059-1-git-send-email-cyliu@suse.com>

On Wed, 2015-09-16 at 14:16 +0800, Chunyan Liu wrote:

For the subject I prefer to avoid "fix <vague>" 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  <pci_device>", 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 <cyliu@suse.com>

With an updated commit message (which I can do as I commit):
Acked-by: Ian Campbell <ian.campbell@citrix.com>

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;

  reply	other threads:[~2015-09-16  8:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-16  6:16 [PATCH] pci-attach: fix assertation Chunyan Liu
2015-09-16  8:25 ` Ian Campbell [this message]
2015-09-16 13:39   ` Ian Jackson
2015-09-16 13:44     ` Ian Campbell
2015-09-16 14:08   ` Wei Liu
2015-09-17 12:00     ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1442391925.18856.23.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=cyliu@suse.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).