mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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@ens-lyon.org> xen-unstable changeset: 21114:d7ee309d0e01 xen-unstable date: Wed Apr 07 08:16:15 2010 +0100
This commit is contained in:
1 parent
a0823f44dc
commit
b60d608f13
4 files changed
+10
-5
No files matched your search
@@ -302,7 +302,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)
|
||||
|
||||
@@ -287,7 +287,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
|
||||
@@ -680,7 +681,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
|
||||
|
||||
@@ -562,7 +562,8 @@ close:
|
||||
snprintf(path, sizeof(path), "%s/request-rx-copy", nodename);
|
||||
xenbus_rm(XBT_NIL, path);
|
||||
|
||||
free_netfront(dev);
|
||||
if (!err)
|
||||
free_netfront(dev);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -377,7 +377,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,
|
||||
|
||||