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-changelog

[Xen-changelog] Fix xlvbd_device_alloc to memset() allocated memory corr

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix xlvbd_device_alloc to memset() allocated memory correctly.
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Mon, 25 Apr 2005 22:21:26 +0000
Delivery-date: Mon, 25 Apr 2005 23:02:55 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1384, 2005/04/25 23:21:26+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Fix xlvbd_device_alloc to memset() allocated memory correctly.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 vbd.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)


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-25 
19:03:16 -04:00
+++ b/linux-2.6.11-xen-sparse/drivers/xen/blkfront/vbd.c        2005-04-25 
19:03:16 -04:00
@@ -102,16 +102,16 @@
 
 spinlock_t blkif_io_lock = SPIN_LOCK_UNLOCKED;
 
-static struct lvdisk * xlvbd_device_alloc(void)
+static struct lvdisk *xlvbd_device_alloc(void)
 {
-    struct lvdisk *ret;
+    struct lvdisk *disk;
 
-    ret = kmalloc(sizeof(struct lvdisk), GFP_KERNEL);
-    if ( ret ) {
-        memset(ret, '\0', 0);
-        INIT_LIST_HEAD(&ret->list);
+    disk = kmalloc(sizeof(*disk), GFP_KERNEL);
+    if (disk) {
+        memset(disk, 0, sizeof(*disk));
+        INIT_LIST_HEAD(&disk->list);
     }
-    return ret;
+    return disk;
 }
 
 static void xlvbd_device_free(struct lvdisk *disk)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix xlvbd_device_alloc to memset() allocated memory correctly., BitKeeper Bot <=