
On 12/03/2013 03:43 AM, Daniel P. Berrange wrote:
On Tue, Dec 03, 2013 at 11:39:15AM +0100, Michal Privoznik wrote:
+ driversInitialized = true; + #ifdef HAVE_DBUS /* Tie the non-priviledged libvirtd to the session/shutdown lifecycle */ if (!virNetServerIsPrivileged(srv)) { @@ -1546,7 +1550,8 @@ cleanup:
daemonConfigFree(config);
- virStateCleanup(); + if (driversInitialized) + virStateCleanup();
Don't we technically need to use an int and atomic int APIs for these changes ?
Not as far as I can tell. Since only one thread is setting the variable, and we are not accessing the variable in a signal handler, it seems that mere 'volatile' is enough to ensure that the compiler won't optimize any out-of-order assignments. I'm fine giving ACK to this patch as-is. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org