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-3.4-testing] blktap: Revert parts of c/s 19349.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] blktap: Revert parts of c/s 19349.
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 02 Jun 2009 22:10:33 -0700
Delivery-date: Thu, 11 Jun 2009 07:58:59 -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 1243863872 -3600
# Node ID c8ab0a7ffc19c77e0b6c3931c1256f548d9c3d8f
# Parent  4ce864e7851fdae3bbafd42db11c902811038de8
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>
xen-unstable changeset:   19685:45447c0f7c6e
xen-unstable date:        Mon Jun 01 14:02:26 2009 +0100
---
 tools/blktap/drivers/blktapctrl.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff -r 4ce864e7851f -r c8ab0a7ffc19 tools/blktap/drivers/blktapctrl.c
--- a/tools/blktap/drivers/blktapctrl.c Mon Jun 01 14:44:11 2009 +0100
+++ b/tools/blktap/drivers/blktapctrl.c Mon Jun 01 14:44:32 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-3.4-testing] blktap: Revert parts of c/s 19349., Xen patchbot-3.4-testing <=