[PATCH] mm-base-manager: ref MMDevice before releasing port
aleksander at aleksander.es
Fri Feb 23 11:45:13 UTC 2018
On 22/02/18 17:55, Dan Williams wrote:
>> Releasing the port on the device looks benign but because it emits
>> a signal, it could call device_context_port_released and unref the
>> MMDevice in port_context_unref. This means the MMDevice might be
>> disposed before we get to the g_object_ref and the subsequent call
>> to g_hash_table_remove will try to hash a null string, which makes
>> MM crash.
> The refcounting looks a bit convoluted in the existing code, but the
> patch LGTM for now.
Yes... the problem is that the primary device object reference is the one stored in the HT, and there are multiple places where that last reference may be disposed.
More information about the ModemManager-devel