[libvirt] [PATCH] Fix race leading to crash when setting up dbus watches

Eric Blake eblake at redhat.com
Wed Dec 18 13:26:59 UTC 2013


On 12/18/2013 05:21 AM, Daniel P. Berrange wrote:
> Currently the virDBusAddWatch does
> 
>   virEventAddHandle(fd, flags,
>                     virDBusWatchCallback,
>                     watch, NULL);
>   dbus_watch_set_data(watch, info, virDBusWatchFree);
> 
> Unfortunately this is racy - since the event loop is in a
> different thread, the virDBusWatchCallback method may be
> run before we get to calling dbus_watch_set_data. We must
> reverse the order of these calls
> 
> See https://bugzilla.redhat.com/show_bug.cgi?id=885445
> 
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
>  src/util/virdbus.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131218/9ab35b57/attachment-0001.sig>


More information about the libvir-list mailing list