WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [PATCH] Fix parse_size_and_unit() breakage in xen-3.

To: "Ian Campbell" <Ian.Campbell@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH] Fix parse_size_and_unit() breakage in xen-3.0.4-testing (kdump broken)
From: "Magnus Damm" <magnus.damm@xxxxxxxxx>
Date: Thu, 11 Jan 2007 10:25:40 +0900
Cc: Magnus Damm <magnus@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Christoph Egger <Christoph.Egger@xxxxxxx>, Hiromichi Itou <ito@xxxxxxxx>
Delivery-date: Wed, 10 Jan 2007 17:25:19 -0800
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=N8Zw04chhbgWGb7W92itQwvDj2q/8YiIO0HySuii4kBUJ2w4XiU+VbJJserJsOHPJ31zThR+Cg+jFIuDKLN39YXK9LieTdzOWfl+3tNT377DMa5xC86vYVE2d9uZitDa8E3SYslCGT/Ih6B5QNcT0SCn1j6QAfz/ePyJIdqxb8I=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1168421062.24570.20.camel@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070110084215.13837.79290.sendpatchset@localhost> <1168421062.24570.20.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 1/10/07, Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx> wrote:
On Wed, 2007-01-10 at 17:42 +0900, Magnus Damm wrote:
> Fix parse_size_and_unit() breakage in xen-3.0.4-testing (kdump broken)
>
> Kdump has been broken since xen-3.0.4-testing.hg-13109.
> Many thanks to Hiromichi Itou for tracking this down.
>
> Signed-Off-By: Magnus Damm <magnus@xxxxxxxxxxxxx>

I applied a similar fix to xen-unstable.hg in 13282:9865145e53eb. I'll
get it pulled into xen-3.0.4-testing.hg.

Great, thanks.

> --- 0001/xen/common/lib.c
> +++ work/xen/common/lib.c     2007-01-10 11:18:38.000000000 +0900
> @@ -442,7 +442,7 @@ s64 __moddi3(s64 a, s64 b)
>  unsigned long long parse_size_and_unit(const char *s, const char **ps)
>  {
>       unsigned long long ret;
> -     const char *s1;
> +     const char *s1 = NULL;
>
>       ret = simple_strtoull(s, &s1, 0);

Are you sure this bit is necessary? simple_strtoull always initialises
&s1.

Probably no, but the reason why I put it there is that we would be
sure to crash if someone happened to change simple_strtoull(). If
simple_strtoull() would forget to write s1 then today we may get
silent errors where switch (*s1) is used on an uninitialized variable.

/ magnus

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel