[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] libxl: init_acpi_config should return rc in exit path



On Wed, Dec 14, 2016 at 11:49:34AM +0000, Andrew Cooper wrote:
> On 14/12/16 11:44, Wei Liu wrote:
> > ... otherwise it returns 0 even if the function fails.
> 
> Coverity-ID: 1397121
> 

Does it work this way? Coverity does lead to the discovery of this bug,
but this CID doesn't reveal the bug directly.
 
> > Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> 
> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> 
> > ---
> > Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> >
> > 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;
> >  }
> >  
> >  int libxl__dom_load_acpi(libxl__gc *gc,
> 

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.