[PATCH] Fix deadlock in an error path
Havoc Pennington
hp at redhat.com
Mon Dec 4 19:13:04 PST 2006
Doug Goldstein wrote:
> Havoc Pennington wrote:
>>
>> John (J5) Palmieri wrote:
>>
>>> which indeed checks to see if there is a lock so
>>> _dbus_bus_notify_shared_connection_disconnected_unlocked needs to assume
>>> there is a lock.
>>>
>> Those are two different locks.
>>
>
> Maybe then a rename is in order to make it a bit more clear so we don't
> run into a similar situation in the future? Or worse someone doesn't
> commit a code "fix" making a similar mistake as well.
>
> Because I certainly looked at it and the Redhat bug as was about to
> patch the Gentoo release because John's conclusions seemed correct to me
> as well.
>
By all means - I think a good fix for this would include making the code
clearer than it was before.
I think it should be possible to ensure that dbus-bus.c always drops the
lock before calling out to something that might call back into dbus-bus.c
Havoc
More information about the dbus
mailing list