[PATCH] Fix deadlock in an error path
Havoc Pennington
hp at redhat.com
Mon Dec 4 16:00:52 PST 2006
Havoc Pennington wrote:
> I think this is just a mistake in naming the function. _unlocked usually
> refers to the connection lock, but this is the global lock in dbus-bus.c
> which is different. I don't know a reason that the dbus-bus.c lock would
> be held already when calling this.
>
Oh, I see in the redhat.com bug there's a backtrace showing an attempt
to lock recursively here.
It's harder to fix than your initial patch though. With your patch, you
would have to *guarantee* that dbus-bus.c global lock is held when doing
the notify. I don't think that's guaranteed right now.
It might be easier to drop the lock in dbus-bus.c before calling
dbus-connection.c to close a connection, or something like that.
Havoc
More information about the dbus
mailing list