Both of these bugs were found while looking for the cause of:
https://bugzilla.redhat.com/show_bug.cgi?id=670848
The end-result of that bug was a crash due to an attempt to
double-free a virDomainObj. Both of these could have contributed to
that crash.
There *may* be other places where virDomainRemoveInactive is called
without having the driverlock (eg - the error handling of
qemuProcessReconnect??), but they can be looked at later; the
occurence fixed here is almost certainly part of the cause of the
crash in Bug 670848.
Note that these bugs showed up when testing transient domains, which
seem to be used relatively less often than persistent domains, but
which put more stress on all of the code that adds and removes
virDomainObjs (if a domain is persistent, its virDomainObj is created
when libvirtd starts, and its virDomainObj remains alive until
libvirtd is terminated, but a transient domain's virDomainObj dies
when the domain is shutdown.) It would probably be a good idea to add some transient
domain stress testing to the libvirt-tck.