Re: [PATCH] daemon: Run virStateCleanup conditionally

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/03/2013 03:43 AM, Daniel P. Berrange wrote:
> On Tue, Dec 03, 2013 at 11:39:15AM +0100, Michal Privoznik wrote:
>> https://bugzilla.redhat.com/show_bug.cgi?id=1033061
>>

>> +    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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]