All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH] libxl: init_acpi_config should return rc in exit path
Date: Fri, 16 Dec 2016 15:16:50 +0000	[thread overview]
Message-ID: <20161216151650.GA11932@citrix.com> (raw)
In-Reply-To: <70b44521-3ae5-68d8-9bbd-1d614d733579@oracle.com>

On Fri, Dec 16, 2016 at 10:10:43AM -0500, Boris Ostrovsky wrote:
> On 12/14/2016 06:49 AM, Andrew Cooper wrote:
> > On 14/12/16 11:44, Wei Liu wrote:
> >> ... otherwise it returns 0 even if the function fails.
> >
> > Coverity-ID: 1397121
> >
> >> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> >
> > Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
> >
> >> ---
> >> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> >>
> >> This should be backported to 4.8.
> >> ---
> >>  tools/libxl/libxl_x86_acpi.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/tools/libxl/libxl_x86_acpi.c b/tools/libxl/libxl_x86_acpi.c
> >> index 686ac8e..6cf0c30 100644
> >> --- a/tools/libxl/libxl_x86_acpi.c
> >> +++ b/tools/libxl/libxl_x86_acpi.c
> >> @@ -154,7 +154,7 @@ static int init_acpi_config(libxl__gc *gc,
> >>      config->acpi_revision = 5;
> >>  
> >>  out:
> >> -    return 0;
> >> +    return rc;
> 
> This breaks init_acpi_config(): xc_domain_getinfo() at the top of
> returns a positive number (number of domains).
> 

I see, I think we also need to set rc=0 in the success path.

Wei.

> -boris
> 
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2016-12-16 15:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-14 11:44 [PATCH] libxl: init_acpi_config should return rc in exit path Wei Liu
2016-12-14 11:49 ` Andrew Cooper
2016-12-14 12:28   ` Wei Liu
2016-12-16 15:10   ` Boris Ostrovsky
2016-12-16 15:16     ` Wei Liu [this message]
2016-12-16 15:21       ` Boris Ostrovsky
2016-12-16 15:20         ` Wei Liu
2016-12-16 15:42           ` Ian Jackson
2016-12-16 11:05 ` Ian Jackson
2016-12-16 11:09   ` Wei Liu
2016-12-16 16:23 ` Wei Liu
2016-12-16 16:25   ` Ian Jackson

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=20161216151650.GA11932@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.