aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-04-12 18:04:44 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-04-12 18:04:44 +0100
commitb60d608f134ee02defdafa04602c1e286e56fa1f (patch)
treed3d5b5817fa5fe9502f6ad11b20aa1bb719981e1 /extras/mini-os
parenta0823f44dc9fc1e086f445c50ef9119e76c56748 (diff)
downloadxen-b60d608f134ee02defdafa04602c1e286e56fa1f.tar.gz
xen-b60d608f134ee02defdafa04602c1e286e56fa1f.tar.bz2
xen-b60d608f134ee02defdafa04602c1e286e56fa1f.zip
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
Diffstat (limited to 'extras/mini-os')
-rw-r--r--extras/mini-os/blkfront.c3
-rw-r--r--extras/mini-os/fbfront.c6
-rw-r--r--extras/mini-os/netfront.c3
-rw-r--r--extras/mini-os/pcifront.c3
4 files changed, 10 insertions, 5 deletions
diff --git a/extras/mini-os/blkfront.c b/extras/mini-os/blkfront.c
index a260f75515..695d8e65ee 100644
--- a/extras/mini-os/blkfront.c
+++ b/extras/mini-os/blkfront.c
@@ -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)
diff --git a/extras/mini-os/fbfront.c b/extras/mini-os/fbfront.c
index b640dbfcb2..8d03e5be5a 100644
--- a/extras/mini-os/fbfront.c
+++ b/extras/mini-os/fbfront.c
@@ -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
diff --git a/extras/mini-os/netfront.c b/extras/mini-os/netfront.c
index 7283b6dfa9..5674c4ae0f 100644
--- a/extras/mini-os/netfront.c
+++ b/extras/mini-os/netfront.c
@@ -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);
}
diff --git a/extras/mini-os/pcifront.c b/extras/mini-os/pcifront.c
index b2e96de4b0..889d701271 100644
--- a/extras/mini-os/pcifront.c
+++ b/extras/mini-os/pcifront.c
@@ -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,