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

[Xen-devel] Re: [Xen-changelog] big cleanup. better support for refresh.

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Re: [Xen-changelog] big cleanup. better support for refresh.
From: Rik van Riel <riel@xxxxxxxxxx>
Date: Mon, 25 Apr 2005 13:27:46 -0400 (EDT)
Delivery-date: Mon, 25 Apr 2005 17:27:36 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Fri, 1 Apr 2005, BitKeeper Bot wrote:

> diff -Nru a/linux-2.6.11-xen-sparse/drivers/xen/blkfront/vbd.c 
> b/linux-2.6.11-xen-sparse/drivers/xen/blkfront/vbd.c
> --- a/linux-2.6.11-xen-sparse/drivers/xen/blkfront/vbd.c      2005-04-01 
> 09:03:00 -05:00
> +++ b/linux-2.6.11-xen-sparse/drivers/xen/blkfront/vbd.c      2005-04-01 
> 09:03:00 -05:00

> +static struct lvdisk * xlvbd_device_alloc(void)
> +{
> +    struct lvdisk *ret;
> +
> +    ret = kmalloc(sizeof(struct lvdisk), GFP_KERNEL);
> +    if ( ret ) {
> +        memset(ret, '\0', 0);

*BLINK*

Surely that should be "memset(ret, '\0', sizeof(struct lvdisk));" ?

> +        INIT_LIST_HEAD(&ret->list);
> +    }
> +    return ret;
> +}


Signed-off-by: Rik van Riel <riel@xxxxxxxxxx>

--- linux-2.6.11/drivers/xen/blkfront/vbd.c.memset      2005-04-25 
12:36:26.000000000 -0400
+++ linux-2.6.11/drivers/xen/blkfront/vbd.c     2005-04-25 12:36:39.000000000 
-0400
@@ -108,7 +108,7 @@ static struct lvdisk * xlvbd_device_allo
 
     ret = kmalloc(sizeof(struct lvdisk), GFP_KERNEL);
     if ( ret ) {
-        memset(ret, '\0', 0);
+        memset(ret, '\0', sizeof(struct lvdisk));
         INIT_LIST_HEAD(&ret->list);
     }
     return ret;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Re: [Xen-changelog] big cleanup. better support for refresh., Rik van Riel <=