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] [TAPDISK] handle error case when opening

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [TAPDISK] handle error case when opening VDIs
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 26 Feb 2007 03:50:15 -0800
Delivery-date: Mon, 26 Feb 2007 04:20:38 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jake Wires <jwires@xxxxxxxxxxxxx>
# Date 1172252432 28800
# Node ID 5ba3037ea5e11bd578ca12439ee8b4f659fa866f
# Parent  ee4850bc895b0784850bd32dfd0e97ccb693fcb6
[TAPDISK] handle error case when opening VDIs
---
 tools/blktap/drivers/tapdisk.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff -r ee4850bc895b -r 5ba3037ea5e1 tools/blktap/drivers/tapdisk.c
--- a/tools/blktap/drivers/tapdisk.c    Fri Feb 23 17:02:58 2007 +0000
+++ b/tools/blktap/drivers/tapdisk.c    Fri Feb 23 09:40:32 2007 -0800
@@ -306,8 +306,11 @@ static int open_disk(struct td_state *s,
                return -ENOMEM;
 
        err = drv->td_open(d, path, 0);
-       if (err)
-               goto fail;
+       if (err) {
+               free_driver(d);
+               s->disks = NULL;
+               return -ENOMEM;
+       }
 
        /* load backing files as necessary */
        while ((err = d->drv->td_get_parent_id(d, &id)) == 0) {

_______________________________________________
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] [TAPDISK] handle error case when opening VDIs, Xen patchbot-unstable <=