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] [xen-unstable] blktap: Revert parts of c/s 19349.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] blktap: Revert parts of c/s 19349.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 02 Jun 2009 10:45:11 -0700
Delivery-date: Tue, 02 Jun 2009 10:45:32 -0700
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1243861346 -3600
# Node ID 45447c0f7c6efcfd9928626c23300149c119bc30
# Parent  46468a3b2d5f5b32aa1edffcb58692727498e785
blktap: Revert parts of c/s 19349.

Caused blktapctrl pipes to be created with uninitialised variable in name.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/blktap/drivers/blktapctrl.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff -r 46468a3b2d5f -r 45447c0f7c6e tools/blktap/drivers/blktapctrl.c
--- a/tools/blktap/drivers/blktapctrl.c Sat May 30 13:25:32 2009 +0100
+++ b/tools/blktap/drivers/blktapctrl.c Mon Jun 01 14:02:26 2009 +0100
@@ -659,6 +659,9 @@ static int blktapctrl_new_blkif(blkif_t 
 
        DPRINTF("Received a poll for a new vbd\n");
        if ( ((blk=blkif->info) != NULL) && (blk->params != NULL) ) {
+               if (blktap_interface_create(ctlfd, &major, &minor, blkif) < 0)
+                       return -1;
+
                if (test_path(blk->params, &ptr, &type, &exist, &use_ioemu) != 
0) {
                         DPRINTF("Error in blktap device string(%s).\n",
                                 blk->params);
@@ -682,6 +685,10 @@ static int blktapctrl_new_blkif(blkif_t 
                        blkif->fds[WRITE] = exist->fds[WRITE];
                }
 
+               add_disktype(blkif, type);
+               blkif->major = major;
+               blkif->minor = minor;
+
                image = (image_t *)malloc(sizeof(image_t));
                blkif->prv = (void *)image;
                blkif->ops = &tapdisk_ops;
@@ -705,18 +712,11 @@ static int blktapctrl_new_blkif(blkif_t 
                        goto fail;
                }
 
-               if (blktap_interface_create(ctlfd, &major, &minor, blkif) < 0)
-                       return -1;
-
-               blkif->major = major;
-               blkif->minor = minor;
-
-               add_disktype(blkif, type);
-
        } else return -1;
 
        return 0;
 fail:
+       ioctl(ctlfd, BLKTAP_IOCTL_FREEINTF, minor);
        return -EINVAL;
 }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] blktap: Revert parts of c/s 19349., Xen patchbot-unstable <=