Libvirt provides a portable, long term stable C API for managing the virtualization technologies provided by many operating systems. It includes support for QEMU, KVM, Xen, LXC, bhyve, Virtuozzo, VMware vCenter and ESX, VMware Desktop, Hyper-V, VirtualBox and the POWER Hypervisor.
Go to file
Daniel P. Berrange c4b2a93907 Fix multiple potential NULL pointer references in monitor usage
Any method which intends to invoke a monitor command must have
a check for virDomainObjIsActive() before using the monitor to
ensure that priv->mon != NULL.

There is one subtle edge case in this though. If a method invokes
multiple monitor commands, and calls qemuDomainObjExitMonitor()
in between two of these commands then there is no guarentee that
priv->mon != NULL anymore. This is because the QEMU process may
exit or die at any time, and because qemuDomainObjEnterMonitor()
releases the lock on virDomainObj, it is possible for the background
thread to close the monitor handle and thus qemuDomainObjExitMonitor
will release the last reference allowing priv->mon to become NULL.

This affects several methods, most notably migration but also some
hotplug methods. This patch takes a variety of approaches to solve
the problem, depending on the particular usage scenario. Generally
though it suffices to add an extra virDomainObjIsActive() check
if qemuDomainObjExitMonitor() was called during the method.

* src/qemu/qemu_driver.c: Fix multiple potential NULL pointer flaws
  in usage of the monitor
2010-05-18 06:03:06 -04:00
.gnulib@28e58203a7 build: update gnulib 2010-05-11 10:03:48 -06:00
build-aux build: update gnulib 2010-03-26 19:16:37 +01:00
daemon Add support for another explicit IO error event 2010-04-30 15:52:59 +01:00
docs docs/Makefile.am: remove unnecessary subshells 2010-05-10 14:59:25 -06:00
examples nwfilter: let qemu's after-migration packet pass 2010-04-27 14:50:35 -04:00
include Add VIR_STORAGE_POOL_INACCESSIBLE to denote inaccessible storage pools 2010-05-18 01:34:34 +02:00
m4 build: don't use "test cond1 -o cond2": it's not portable 2010-03-25 09:28:24 +01:00
po Release of libvirt-0.8.1 2010-04-30 18:55:08 +02:00
proxy build: fix up some compiler flags 2010-05-17 09:12:42 -06:00
python Add support for another explicit IO error event 2010-04-30 15:52:59 +01:00
src Fix multiple potential NULL pointer references in monitor usage 2010-05-18 06:03:06 -04:00
tests qemu_conf: fix flag value 2010-05-17 16:28:02 -06:00
tools Add VIR_STORAGE_POOL_INACCESSIBLE to denote inaccessible storage pools 2010-05-18 01:34:34 +02:00
.gitignore build: avoid compiler warning 2010-05-03 17:07:39 -06:00
.gitmodules
.hgignore
.x-sc_avoid_ctype_macros
.x-sc_avoid_if_before_free
.x-sc_avoid_write Fully asynchronous monitor I/O processing 2009-11-10 13:27:18 +00:00
.x-sc_m4_quote_check syntax-check: enable more checks 2009-02-03 13:08:36 +00:00
.x-sc_prohibit_always_true_header_tests build: update gnulib 2010-05-06 14:35:38 -06:00
.x-sc_prohibit_asprintf
.x-sc_prohibit_gethostby Various syntax-check fixes. 2009-10-26 10:34:05 +01:00
.x-sc_prohibit_gethostname
.x-sc_prohibit_gettext_noop build: fix syntax-check problems 2010-04-12 16:43:05 -06:00
.x-sc_prohibit_have_config_h
.x-sc_prohibit_HAVE_MBRTOWC
.x-sc_prohibit_nonreentrant
.x-sc_prohibit_readlink Add a rule to check for uses of readlink. 2010-01-22 09:42:35 -05:00
.x-sc_prohibit_strcmp
.x-sc_prohibit_strcmp_and_strncmp Ignore docs/ directory for strcmp() syntax check 2009-11-23 11:58:13 +00:00
.x-sc_prohibit_strncpy
.x-sc_prohibit_test_minus_ao build: fix syntax-check problems 2010-04-12 16:43:05 -06:00
.x-sc_prohibit_VIR_ERR_NO_MEMORY
.x-sc_require_config_h
.x-sc_require_config_h_first
.x-sc_trailing_blank
.x-sc_unmarked_diagnostics build: import latest gnulib 2010-04-02 10:18:55 -06:00
acinclude.m4 build: fix up some compiler flags 2010-05-17 09:12:42 -06:00
AUTHORS maint: update AUTHORS 2010-04-23 07:48:10 -06:00
autobuild.sh autobuild.sh: provide default prefix 2010-04-30 11:13:06 -06:00
autogen.sh build: improve check for out-of-date .gnulib submodule 2010-04-02 15:49:32 -06:00
bootstrap maint: relax git minimum version 2010-02-24 14:29:27 -05:00
bootstrap.conf build: update gnulib 2010-05-11 10:03:48 -06:00
cfg.mk maint: add more free-like functions to the list and deal with fallout 2010-05-18 07:53:42 +02:00
ChangeLog-old
configure.ac build: avoid compile failure on linux kernels older than 2.6.19 2010-05-17 16:50:36 +02:00
COPYING.LIB remove all trailing blank lines 2009-07-16 15:06:42 +02:00
HACKING docs: hacking: explain why using curly braces well is important 2010-05-04 15:41:21 +02:00
libvirt.pc.in * libvirt.pc.in: applied patch from Daniel Berrange to fix --cflags 2006-03-24 13:18:12 +00:00
libvirt.spec.in rpmbuild: add ebtables & ip(6)tables dependency for rpm 2010-05-05 12:20:28 -04:00
Makefile.am build: fix syntax-check problems 2010-04-12 16:43:05 -06:00
Makefile.nonreentrant
mingw32-libvirt.spec.in mingw32-libvirt.spec: bring up to date 2010-05-07 13:11:25 -06:00
README Correct typos in the documentation (Atsushi SAKAI) 2008-01-24 10:15:13 +00:00
README-hacking maint: relax git minimum version 2010-02-24 14:29:27 -05:00
TODO

         LibVirt : simple API for virtualization

  Libvirt is a C toolkit to interact with the virtualization capabilities
of recent versions of Linux (and other OSes). It is free software
available under the GNU Lesser General Public License. Virtualization of
the Linux Operating System means the ability to run multiple instances of
Operating Systems concurrently on a single hardware system where the basic
resources are driven by a Linux instance. The library aim at providing
long term stable C API initially for the Xen paravirtualization but
should be able to integrate other virtualization mechanisms if needed.

Daniel Veillard <veillard@redhat.com>