Re: [PATCH] lxc_monitor: Avoid AB / BA lock race

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

 



On 09/25/2018 04:31 PM, Mark Asselstine wrote:
> On Tuesday, September 25, 2018 5:20:26 AM EDT Michal Privoznik wrote:
>> On 09/24/2018 05:11 PM, Mark Asselstine wrote:

> 
> Here is my read, again I have to caveat that this code is rather new to me.
> 
> The object poisoning in virObjectUnref() would prevent a double free as the 
> second call would fail VIR_OBJECT_NOTVALID(). However, you are still correct 
> as the mon object would potentially be destroyed and cleaned up before the 
> close callback is run and thus when the the close callback is eventually run 
> it would be operating on an old, no longer valid object.
> 
> So good catch on your part, thanks.

Yep, makes sense. I've ACKed and pushed this.

Congratulations on your first libvirt contribution. Usually it is just a
typo fix but you fixed a deadlock. Impressive.

Michal

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

  Powered by Linux