]> xenbits.xensource.com Git - libvirt.git/commit
Fix vmdef usage after domain crash in monitor on device attach
authorJán Tomko <jtomko@redhat.com>
Wed, 7 Jan 2015 12:12:18 +0000 (13:12 +0100)
committerJán Tomko <jtomko@redhat.com>
Mon, 19 Jan 2015 09:12:32 +0000 (10:12 +0100)
commit3070bc8ee52efed073e5d351bfdb1072bbc6e303
tree4dbdc8bb58aceba4156d17da36cec026c1d9b1c8
parent6edb97f29af5c266617943ab36534f2f81aeb49a
Fix vmdef usage after domain crash in monitor on device attach

https://bugzilla.redhat.com/show_bug.cgi?id=1161024

If the domain crashed while we were in monitor,
we cannot rely on the REALLOC done on live definition,
since vm->def now points to the persistent definition.
Skip adding the attached devices to domain definition
if the domain crashed.

In AttachChrDevice, the chardev was already added to the
live definition and freed by qemuProcessStop in the case
of a crash. Skip the device removal in that case.

Also skip audit if the domain crashed in the meantime.
src/qemu/qemu_hotplug.c