[PATCH 1/2] port-serial: allow completions not in idle

Aleksander Morgado aleksander at aleksander.es
Thu Mar 10 16:47:39 UTC 2016


On Thu, Mar 10, 2016 at 5:02 PM, Dan Williams <dcbw at redhat.com> wrote:
>> In addition to the problems with the references, we also update the
>> common_input_available() method so that the source isn't kept if the last
>> response buffer processing ended up closing the port.
>>
>
> I had a comment about the common_input_available() change to return
> G_SOURCE_REMOVE being redundant (since it only does this when the
> source is already removed) but the code is OK as-is.  LGTM.

The thing I saw is that if the port was being closed as a result of a
response processing within common_input_available(), we were calling
g_source_remove() for the GSource associated with
common_input_available(), and then we were returning
TRUE/G_SOURCE_CONTINUE on that same GSource, which looks like it was
re-adding the GSource as valid again back in the loop (and that would
crash if more data was arrived and the port was already unref-ed). Not
sure if that change is the one you're referring to.


-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list