==15673== 240 (40 direct, 200 indirect) bytes in 1 blocks are definitely lost in loss record 4,341 of 4,535
==15673== at 0x647F014: g_type_create_instance (in /usr/lib/libgobject-2.0.so.0.5200.3)
==15673== by 0x6460027: ??? (in /usr/lib/libgobject-2.0.so.0.5200.3)
==15673== by 0x6461A54: g_object_newv (in /usr/lib/libgobject-2.0.so.0.5200.3)
==15673== by 0x6462213: g_object_new (in /usr/lib/libgobject-2.0.so.0.5200.3)
==15673== by 0x4E97C33: mm_unlock_retries_new (mm-unlock-retries.c:217)
==15673== by 0x4E97A6F: mm_unlock_retries_new_from_dictionary (mm-unlock-retries.c:171)
==15673== by 0x170B09: mm_iface_modem_get_unlock_retries (mm-iface-modem.c:2942)
==15673== by 0x1DB0A4: pin_query_unlock_retries_ready (mm-broadband-modem-mbim.c:782)
==15673== by 0x613AD52: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
==15673== by 0x613B775: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
==15673== by 0x57D525D: transaction_task_complete_and_free (mbim-device.c:246)
==15673== by 0x57D6086: process_message (mbim-device.c:666)
The mm_base_modem_find_ports() method builds a list of full
references, so we need to unref them in the peek() methods.
==10047== 14,959 (24 direct, 14,935 indirect) bytes in 1 blocks are definitely lost in loss record 5,470 of 5,473
==10047== at 0x4C2CE5F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==10047== by 0x66E3028: g_malloc (in /usr/lib/libglib-2.0.so.0.5200.3)
==10047== by 0x66FAB25: g_slice_alloc (in /usr/lib/libglib-2.0.so.0.5200.3)
==10047== by 0x66D9A33: g_list_append (in /usr/lib/libglib-2.0.so.0.5200.3)
==10047== by 0x15F6A7: mm_base_modem_find_ports (mm-base-modem.c:845)
==10047== by 0x15E9F3: mm_base_modem_peek_port_qmi_for_data (mm-base-modem.c:579)
==10047== by 0x15E8FC: mm_base_modem_get_port_qmi_for_data (mm-base-modem.c:555)
==10047== by 0x1BB99F: _connect (mm-bearer-qmi.c:1391)
==10047== by 0x1540B4: mm_base_bearer_connect (mm-base-bearer.c:841)
==10047== by 0x181F4F: connection_step (mm-iface-modem-simple.c:597)
==10047== by 0x181321: create_bearer_ready (mm-iface-modem-simple.c:258)
==10047== by 0x612FD52: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
MBIM modems can be supported by the 'generic' plugin. Instead of
treating the plugin name (i.e. Generic) as the manufacturer, it's more
useful to use the manufacturer information reported by the underlying
USB device if that is available.
A USB device may report its manufacturer through the Manufacturer String
Descriptor. That information can sometimes be useful, e.g. MBIM doesn't
define a standard command to query the manufacturer. This patch adds a
method to MMKernelDevice to retrieve the manufacturer information from
the underlying physical device, which can later be used by
MMBroadbandModemMbim to report the manufacturer of a MBIM modem.
The 'port' field in DetailedRegistrationStateContext is initialized to
NULL but never updated or used.
When detailed_registration_state_context_complete_and_free() calls
g_object_unref() on the NULL 'port' field, an assertion is raised.
The internal QmiDevice will be gone when the port is closed, so we
cannot really do anything.
This avoid an issue happening when the modem goes away in the middle
of the client allocation logic performed by MMBroadbandModemQmi:
ModemManager[24820]: <debug> [1507279407.225777] Couldn't allocate client for service 'wms': Couldn't create client for service 'wms': CID allocation failed in the CTL client: Transaction timed out
ModemManager[24820]: qmi_device_allocate_client: assertion 'QMI_IS_DEVICE (self)' failed
==24820==
==24820== Process terminating with default action of signal 5 (SIGTRAP): dumping core
==24820== at 0x66E3411: ??? (in /usr/lib/libglib-2.0.so.0.5200.3)
==24820== by 0x66E46FA: g_logv (in /usr/lib/libglib-2.0.so.0.5200.3)
==24820== by 0x66E484E: g_log (in /usr/lib/libglib-2.0.so.0.5200.3)
==24820== by 0x538E259: qmi_device_allocate_client (qmi-device.c:1008)
==24820== by 0x1F5690: mm_port_qmi_allocate_client (mm-port-qmi.c:157)
==24820== by 0x1D20BA: allocate_next_client (mm-broadband-modem-qmi.c:11319)
==24820== by 0x1D2027: qmi_port_allocate_client_ready (mm-broadband-modem-qmi.c:11306)
==24820== by 0x612FD52: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
==24820== by 0x6130775: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
==24820== by 0x1F54E8: allocate_client_ready (mm-port-qmi.c:113)
==24820== by 0x612FD52: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
==24820== by 0x6130775: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
This patch implements load_unlock_retries() for the Novatel LTE modem by
using the AT$NWPINR? command to query the number of retries left for
entering PIN1 or PIN2.
Ported from the original patch by Arman Uguray <armansito@chromium.org>:
https://chromium-review.googlesource.com/c/58118