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

Re: [Xen-devel] [PATCH] libxc: fix uninitialised usage of rc in meminit_hvm



On Tue, Feb 02, 2016 at 12:33:20PM +0100, Roger Pau Monne wrote:
> From: Roger Pau Monne <royger@xxxxxxxxxxx>
> 
> Due to the HVMlite changes there's a chance that the value in rc is checked
> without being initialised. Fix this by initialising it to 0.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> Reported-by: Olaf Hering <olaf@xxxxxxxxx>

Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>

> ---
> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
> Cc: Wei Liu <wei.liu2@xxxxxxxxxx>
> ---
>  tools/libxc/xc_dom_x86.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/libxc/xc_dom_x86.c b/tools/libxc/xc_dom_x86.c
> index ef474a8..08337b2 100644
> --- a/tools/libxc/xc_dom_x86.c
> +++ b/tools/libxc/xc_dom_x86.c
> @@ -1259,7 +1259,7 @@ static int meminit_hvm(struct xc_dom_image *dom)
>      unsigned long p2m_size;
>      unsigned long target_pages = dom->target_pages;
>      unsigned long cur_pages, cur_pfn;
> -    int rc;
> +    int rc = 0;
>      xen_capabilities_info_t caps;
>      unsigned long stat_normal_pages = 0, stat_2mb_pages = 0, 
>          stat_1gb_pages = 0;
> -- 
> 2.5.4 (Apple Git-61)
> 

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


 


Rackspace

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