[libvirt] [PATCH 00/11] Fix vm usage after ExitMonitor

Ján Tomko jtomko at redhat.com
Tue Dec 16 16:41:24 UTC 2014


Check if the domain died while we were in the monitor
in most of the places (I didn't look at the Snapshot and Blockjob
APIs yet).
In some places, we've been accessing the data after it could've been
freed by qemuProcessStop (if the monitor API itself returned success,
but the domain was cleaned up because somehow qemuProcessStop
got the vm lock before the ExitMonitor call).

A more likely crash happens if qemu crashes in one of the APIs
with multiple Monitor calls, like the DetachDevice APIs
and AttachCharDevice.

Also, some occurences of writing the status XML for a dead domain
are fixed.

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

Ján Tomko (11):
  Introduce qemuDomainObjExitMonitorAlive
  Mark the domain as active in qemuhotplugtest
  Fix vm usage after ExitMonitor in UpdateDeviceList
  Fix vm usage after ExitMonitor on device removal
  Fix error message on redirdev caps detection
  Fix vm usage after ExitMonitor on AttachDevice
  Fix vm usage after ExitMonitor in DetachDevice
  Fix monitor usage in qemuDomainHotplugVcpus
  Fix vm usage after ExitMonitor in qemu driver
  Fix vm usage after ExitMonitor in qemu migration
  Fix vm usage after ExitMonitor in qemu process

 src/qemu/qemu_command.c   |   6 +-
 src/qemu/qemu_domain.c    |  20 +++++-
 src/qemu/qemu_domain.h    |   3 +
 src/qemu/qemu_driver.c    |  49 ++++++++++----
 src/qemu/qemu_hotplug.c   | 169 +++++++++++++++++++++++++++++++---------------
 src/qemu/qemu_migration.c |  41 +++++++----
 src/qemu/qemu_process.c   |  65 ++++++++++++------
 tests/qemuhotplugtest.c   |   4 ++
 8 files changed, 251 insertions(+), 106 deletions(-)

-- 
2.0.4




More information about the libvir-list mailing list