Re: [PATCH] daemon: cleanup state drivers in order reverse to init order

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

 



On 05/26/2016 03:56 AM, Nikolay Shirokovskiy wrote:
> Ping. Cole ACKed already, probably patch need extra reviwers.
> 

Sorry I thought you had commit access... I've pushed now

Thanks,
Cole

> On 17.05.2016 14:44, Nikolay Shirokovskiy wrote:
>> This patch aims to fix observed crash on daemon shutdown. Main thread is in
>> the process of state drivers cleanup, network driver is cleaned up and
>> qemu driver is not yet. Meanwhile eof event from qemu process triggers
>> qemuProcessStop -> networkReleaseActualDevice and crash happens as
>> network driver is already cleaned up.
>>
>> Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx>
>> ---
>>  src/libvirt.c | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/libvirt.c b/src/libvirt.c
>> index 114e88c..d79fe75 100644
>> --- a/src/libvirt.c
>> +++ b/src/libvirt.c
>> @@ -800,12 +800,12 @@ virStateInitialize(bool privileged,
>>  int
>>  virStateCleanup(void)
>>  {
>> -    size_t i;
>> +    int r;
>>      int ret = 0;
>>  
>> -    for (i = 0; i < virStateDriverTabCount; i++) {
>> -        if (virStateDriverTab[i]->stateCleanup &&
>> -            virStateDriverTab[i]->stateCleanup() < 0)
>> +    for (r = virStateDriverTabCount - 1; r >= 0; r--) {
>> +        if (virStateDriverTab[r]->stateCleanup &&
>> +            virStateDriverTab[r]->stateCleanup() < 0)
>>              ret = -1;
>>      }
>>      return ret;
>>
> 
> --
> libvir-list mailing list
> libvir-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list
> 

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