diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2012-03-28 12:46:11 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-03-28 12:46:11 -0500 |
commit | 49e00ba9698469b5eccec947050216192d9a9e34 (patch) | |
tree | aff79a28cd2dec276d576f94ea7c299c096fe694 | |
parent | c76d1a9b3f367754966c326d81ff8566798b473a (diff) | |
parent | 7429f2e1981c6cc77a853e2e88654001bdddd461 (diff) |
Merge remote-tracking branch 'sstabellini/xen-fixes' into staging
* sstabellini/xen-fixes:
xen_disk: detach the blkdev before bdrv_delete
xen_console: ignore console disconnect events from console/0
-rw-r--r-- | hw/xen_console.c | 3 | ||||
-rw-r--r-- | hw/xen_disk.c | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/hw/xen_console.c b/hw/xen_console.c index edcb31ce66..3794b1972d 100644 --- a/hw/xen_console.c +++ b/hw/xen_console.c @@ -248,6 +248,9 @@ static void con_disconnect(struct XenDevice *xendev) { struct XenConsole *con = container_of(xendev, struct XenConsole, xendev); + if (!xendev->dev) { + return; + } if (con->chr) qemu_chr_add_handlers(con->chr, NULL, NULL, NULL, NULL); xen_be_unbind_evtchn(&con->xendev); diff --git a/hw/xen_disk.c b/hw/xen_disk.c index 68fa36a1cf..bf06fc1978 100644 --- a/hw/xen_disk.c +++ b/hw/xen_disk.c @@ -726,6 +726,7 @@ static void blk_disconnect(struct XenDevice *xendev) if (!blkdev->dinfo) { /* close/delete only if we created it ourself */ bdrv_close(blkdev->bs); + bdrv_detach_dev(blkdev->bs, blkdev); bdrv_delete(blkdev->bs); } blkdev->bs = NULL; |