From: Keir Fraser Date: Fri, 4 Apr 2008 09:18:45 +0000 (+0100) Subject: xm: When dumping core of an errant domain do not unpause after the X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14231^2~79 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b6eb51444c12dd4bd949d806804184f519ce1287;p=xen.git xm: When dumping core of an errant domain do not unpause after the dump. This could allow the domain to e.g., access disks after fail-over. Signed-off-by: Masaki Kanno --- diff --git a/tools/python/xen/xm/main.py b/tools/python/xen/xm/main.py index 8a161e6f7f..f5ad85d381 100644 --- a/tools/python/xen/xm/main.py +++ b/tools/python/xen/xm/main.py @@ -1294,14 +1294,14 @@ def xm_dump_core(args): try: print "Dumping core of domain: %s ..." % str(dom) server.xend.domain.dump(dom, filename, live, crash) + + if crash: + print "Destroying domain: %s ..." % str(dom) + server.xend.domain.destroy(dom) finally: - if not live and ds == DOM_STATE_RUNNING: + if not live and not crash and ds == DOM_STATE_RUNNING: server.xend.domain.unpause(dom) - if crash: - print "Destroying domain: %s ..." % str(dom) - server.xend.domain.destroy(dom) - def xm_rename(args): arg_check(args, "rename", 2)