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] mini-os: Fix crash on frontend shutdown f

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] mini-os: Fix crash on frontend shutdown failures
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 07 Apr 2010 02:20:22 -0700
Delivery-date: Wed, 07 Apr 2010 02:20:52 -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 1270624575 -3600
# Node ID d7ee309d0e0137c051b464b445f75e5059b181d0
# Parent  3895f8e0e63310e76a80e88ae31ccee2053ab8f2
mini-os: Fix crash on frontend shutdown failures

Do not free frontend resources if some error happened, since the
backend may not have finished properly restarting in such case.

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
---
 extras/mini-os/blkfront.c |    3 ++-
 extras/mini-os/fbfront.c  |    6 ++++--
 extras/mini-os/netfront.c |    3 ++-
 extras/mini-os/pcifront.c |    3 ++-
 4 files changed, 10 insertions(+), 5 deletions(-)

diff -r 3895f8e0e633 -r d7ee309d0e01 extras/mini-os/blkfront.c
--- a/extras/mini-os/blkfront.c Wed Apr 07 08:15:55 2010 +0100
+++ b/extras/mini-os/blkfront.c Wed Apr 07 08:16:15 2010 +0100
@@ -313,7 +313,8 @@ close:
     snprintf(path, sizeof(path), "%s/event-channel", nodename);
     xenbus_rm(XBT_NIL, path);
 
-    free_blkfront(dev);
+    if (!err)
+        free_blkfront(dev);
 }
 
 static void blkfront_wait_slot(struct blkfront_dev *dev)
diff -r 3895f8e0e633 -r d7ee309d0e01 extras/mini-os/fbfront.c
--- a/extras/mini-os/fbfront.c  Wed Apr 07 08:15:55 2010 +0100
+++ b/extras/mini-os/fbfront.c  Wed Apr 07 08:16:15 2010 +0100
@@ -288,7 +288,8 @@ close_kbdfront:
     snprintf(path, sizeof(path), "%s/request-abs-pointer", nodename);
     xenbus_rm(XBT_NIL, path);
 
-    free_kbdfront(dev);
+    if (!err)
+        free_kbdfront(dev);
 }
 
 #ifdef HAVE_LIBC
@@ -681,7 +682,8 @@ close_fbfront:
     snprintf(path, sizeof(path), "%s/feature-update", nodename);
     xenbus_rm(XBT_NIL, path);
 
-    free_fbfront(dev);
+    if (!err)
+        free_fbfront(dev);
 }
 
 #ifdef HAVE_LIBC
diff -r 3895f8e0e633 -r d7ee309d0e01 extras/mini-os/netfront.c
--- a/extras/mini-os/netfront.c Wed Apr 07 08:15:55 2010 +0100
+++ b/extras/mini-os/netfront.c Wed Apr 07 08:16:15 2010 +0100
@@ -574,7 +574,8 @@ close:
     snprintf(path, sizeof(path), "%s/request-rx-copy", nodename);
     xenbus_rm(XBT_NIL, path);
 
-    free_netfront(dev);
+    if (!err)
+        free_netfront(dev);
 }
 
 
diff -r 3895f8e0e633 -r d7ee309d0e01 extras/mini-os/pcifront.c
--- a/extras/mini-os/pcifront.c Wed Apr 07 08:15:55 2010 +0100
+++ b/extras/mini-os/pcifront.c Wed Apr 07 08:16:15 2010 +0100
@@ -378,7 +378,8 @@ close_pcifront:
     snprintf(path, sizeof(path), "%s/event-channel", nodename);
     xenbus_rm(XBT_NIL, path);
 
-    free_pcifront(dev);
+    if (!err)
+        free_pcifront(dev);
 }
 
 int pcifront_physical_to_virtual (struct pcifront_dev *dev,

_______________________________________________
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] mini-os: Fix crash on frontend shutdown failures, Xen patchbot-unstable <=