Re: [PATCH] remote: Prevent race when closing a connection

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

 



On 03/15/2013 10:33 AM, Daniel P. Berrange wrote:

No, this really isn't solving the problem. The virConnectDipose
function is the last thing to run on an object. Once virConnectDispose
is running absolutely nothing else may safely use that object pointer.
The thread that is not in virConnectDispose here is missing a reference
on the object, to prevent it being destroyed while it is still in use.

so NACk to this patch, it doesn't fix the problem, merely makes a SEGV
slightly less likely.

Daniel


I understand your objection and I have already tested a patch which
increments the object ref counter when registering a close callback.
The unfortunate thing is that the close callback isn't guaranteed to
be deregistered (causing a virsh leaked reference complaint). As my
brain kicks in while I'm typing, this is probably the way to go ...

--

Mit freundlichen Grüßen/Kind Regards
   Viktor Mihajlovski

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martina Köderitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

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