[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Initialise blkfront_info to zeroes after allocating it.
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 7d8efd4f1ac77f70316be26ff9fb6e7bd923b45a # Parent d14cb80574eefad2d2a782f561b617a0a9494da2 Initialise blkfront_info to zeroes after allocating it. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> diff -r d14cb80574ee -r 7d8efd4f1ac7 linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c Tue Mar 14 12:01:43 2006 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c Tue Mar 14 14:18:35 2006 @@ -95,20 +95,16 @@ xenbus_dev_fatal(dev, -ENOMEM, "allocating info structure"); return -ENOMEM; } + + memset(info, 0, sizeof(*info)); info->xbdev = dev; info->vdevice = vdevice; info->connected = BLKIF_STATE_DISCONNECTED; - info->mi = NULL; - info->gd = NULL; INIT_WORK(&info->work, blkif_restart_queue, (void *)info); - info->shadow_free = 0; - memset(info->shadow, 0, sizeof(info->shadow)); for (i = 0; i < BLK_RING_SIZE; i++) info->shadow[i].req.id = i+1; info->shadow[BLK_RING_SIZE-1].req.id = 0x0fffffff; - - info->users = 0; /* Front end dir is a number, which is used as the id. */ info->handle = simple_strtoul(strrchr(dev->nodename,'/')+1, NULL, 0); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |