Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
Otherwise, we may end up with transactions timing out and segfaulting as they
aren't found in the tracking table (e.g. if the replacing transaction finishes
before the timeout of the replaced transaction is fired off).
==573== Command: /usr/libexec/qmi-proxy --no-exit --verbose
==573== Parent PID: 567
==573==
==573== Invalid write of size 8
==573== at 0x4E9A07A: transaction_timed_out (qmi-device.c:248)
==573== by 0x5D24EB2: ??? (in /usr/lib/libglib-2.0.so.0.5000.1)
==573== by 0x5D24439: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.5000.1)
==573== by 0x5D247EF: ??? (in /usr/lib/libglib-2.0.so.0.5000.1)
==573== by 0x5D24B11: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.5000.1)
==573== by 0x40139D: main (qmi-proxy.c:220)
==573== Address 0x10 is not stack'd, malloc'd or (recently) free'd
==573==
==573==
==573== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==573== Access not within mapped region at address 0x10
==573== at 0x4E9A07A: transaction_timed_out (qmi-device.c:248)
==573== by 0x5D24EB2: ??? (in /usr/lib/libglib-2.0.so.0.5000.1)
==573== by 0x5D24439: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.5000.1)
==573== by 0x5D247EF: ??? (in /usr/lib/libglib-2.0.so.0.5000.1)
==573== by 0x5D24B11: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.5000.1)
==573== by 0x40139D: main (qmi-proxy.c:220)
==573== If you believe this happened as a result of a stack
==573== overflow in your program's main thread (unlikely but
==573== possible), you can try to increase the size of the
==573== main thread stack using the --main-stacksize= flag.
==573== The main thread stack size used in this run was 8388608.
(cherry picked from commit 0148e81aa978a5d94ef2e9ddf8adfefa7ce2ef3f)
|
|
(cherry picked from commit c1442b3a7fedd8b713136cd2598a210549508cdf)
|
|
If the client which originated the request exits (e.g. HUP received in its
socket) before the actual response from the QmiDevice arrives, we'll end up
trying to access the Client info (as kept in request->client) even if it has
already been freed.
Fix that, by making the Client a ref-counted object, and passing around full
references of the Client where needed, e.g.:
* In the async callbacks where Client is passed as data.
* Inside each Request.
Doing this we make sure each operation has a totally valid Client until the
operation finishes, even if the client gets disconnected in between.
==311== Invalid read of size 8
==311== at 0x4E9381C: track_cid (qmi-proxy.c:443)
==311== by 0x4E93A45: device_command_ready (qmi-proxy.c:492)
==311== by 0x52BEC18: g_simple_async_result_complete (gsimpleasyncresult.c:777)
==311== by 0x52BEC4E: complete_in_idle_cb (gsimpleasyncresult.c:789)
==311== by 0x583FA6D: g_idle_dispatch (gmain.c:5250)
==311== by 0x583D47A: g_main_dispatch (gmain.c:3065)
==311== by 0x583E237: g_main_context_dispatch (gmain.c:3641)
==311== by 0x583E463: g_main_context_iterate (gmain.c:3712)
==311== by 0x583E79C: g_main_loop_run (gmain.c:3906)
==311== by 0x401411: main (qmi-proxy.c:220)
==311== Address 0x87c7450 is 48 bytes inside a block of size 64 free'd
==311== at 0x4C2A0C0: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==311== by 0x584519E: g_free (gmem.c:197)
==311== by 0x585BBF6: g_slice_free1 (gslice.c:1124)
==311== by 0x4E92CC5: client_free (qmi-proxy.c:149)
==311== by 0x4E92DD4: connection_close (qmi-proxy.c:177)
==311== by 0x4E93CFF: connection_readable_cb (qmi-proxy.c:586)
==311== by 0x52C2A4D: socket_source_dispatch (gsocket.c:3264)
==311== by 0x583D47A: g_main_dispatch (gmain.c:3065)
==311== by 0x583E237: g_main_context_dispatch (gmain.c:3641)
==311== by 0x583E463: g_main_context_iterate (gmain.c:3712)
==311== by 0x583E79C: g_main_loop_run (gmain.c:3906)
==311== by 0x401411: main (qmi-proxy.c:220)
==311== Block was alloc'd at
==311== at 0x4C2B3D0: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==311== by 0x584502D: g_malloc (gmem.c:104)
==311== by 0x585B990: g_slice_alloc (gslice.c:1016)
==311== by 0x585B9D4: g_slice_alloc0 (gslice.c:1042)
==311== by 0x4E93FC5: incoming_cb (qmi-proxy.c:655)
==311== by 0x60F2A4B: ffi_call_unix64 (unix64.S:75)
==311== by 0x60F24B8: ffi_call (ffi64.c:492)
==311== by 0x55BB773: g_cclosure_marshal_generic (gclosure.c:1454)
==311== by 0x55BA093: g_closure_invoke (gclosure.c:777)
==311== by 0x55D1B45: signal_emit_unlocked_R (gsignal.c:3586)
==311== by 0x55D0F00: g_signal_emit_valist (gsignal.c:3340)
==311== by 0x55D1383: g_signal_emit (gsignal.c:3386)
and:
==9308== Invalid read of size 8
==9308== at 0x4E93641: device_new_ready (qmi-proxy.c:348)
==9308== by 0x52BEC18: g_simple_async_result_complete (gsimpleasyncresult.c:777)
==9308== by 0x52BEC4E: complete_in_idle_cb (gsimpleasyncresult.c:789)
==9308== by 0x583FA6D: g_idle_dispatch (gmain.c:5250)
==9308== by 0x583D47A: g_main_dispatch (gmain.c:3065)
==9308== by 0x583E237: g_main_context_dispatch (gmain.c:3641)
==9308== by 0x583E463: g_main_context_iterate (gmain.c:3712)
==9308== by 0x583E79C: g_main_loop_run (gmain.c:3906)
==9308== by 0x401411: main (qmi-proxy.c:220)
==9308== Address 0x8d04930 is 32 bytes inside a block of size 72 free'd
==9308== at 0x4C2A0C0: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9308== by 0x584519E: g_free (gmem.c:197)
==9308== by 0x585BBF6: g_slice_free1 (gslice.c:1124)
==9308== by 0x4E92EAB: client_free (qmi-proxy.c:159)
==9308== by 0x4E92FBA: connection_close (qmi-proxy.c:187)
==9308== by 0x4E93FC1: connection_readable_cb (qmi-proxy.c:626)
==9308== by 0x52C2A4D: socket_source_dispatch (gsocket.c:3264)
==9308== by 0x583D47A: g_main_dispatch (gmain.c:3065)
==9308== by 0x583E237: g_main_context_dispatch (gmain.c:3641)
==9308== by 0x583E463: g_main_context_iterate (gmain.c:3712)
==9308== by 0x583E79C: g_main_loop_run (gmain.c:3906)
==9308== by 0x401411: main (qmi-proxy.c:220)
==9308== Block was alloc'd at
==9308== at 0x4C2B3D0: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9308== by 0x584502D: g_malloc (gmem.c:104)
==9308== by 0x585B990: g_slice_alloc (gslice.c:1016)
==9308== by 0x585B9D4: g_slice_alloc0 (gslice.c:1042)
==9308== by 0x4E94287: incoming_cb (qmi-proxy.c:695)
==9308== by 0x60F2A4B: ffi_call_unix64 (unix64.S:75)
==9308== by 0x60F24B8: ffi_call (ffi64.c:492)
==9308== by 0x55BB773: g_cclosure_marshal_generic (gclosure.c:1454)
==9308== by 0x55BA093: g_closure_invoke (gclosure.c:777)
==9308== by 0x55D1B45: signal_emit_unlocked_R (gsignal.c:3586)
==9308== by 0x55D0F00: g_signal_emit_valist (gsignal.c:3340)
==9308== by 0x55D1383: g_signal_emit (gsignal.c:3386)
(cherry picked from commit b760b98a5d324351dbabb89edfeaee696ae0cf84)
|
|
(cherry picked from commit 5a370d0929e756912e4486e1869c877618a4b6c1)
|
|
plug memleak
(cherry picked from commit 5284d3e2473d1b3e5f3584b37ae0bba3498ade4e)
|
|
plug memleak
(cherry picked from commit 237d8c38ff2977b53de0dd961fadeb857d7b354f)
|
|
(cherry picked from commit 13747cf3b03cb288e87c83779dc8c2320ea0ea0e)
|
|
But only seems supported on GSM/UMTS firmware. Tested on Novatel USB1000:
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] QMI Device supports 6 services:
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] ctl (1.0)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] wds (1.1)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] dms (1.1)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] nas (1.0)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] wms (1.0)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] pds (1.0)
(cherry picked from commit 687fc4dae3c2a92619079210e0b0f046a6450890)
|
|
Need CDMA/EVDO firmware for it though. Tested on Novatel USB1000:
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] QMI Device supports 6 services:
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] ctl (1.0)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] wds (1.1)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] dms (1.1)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] nas (1.0)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] wms (1.0)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] pds (1.0)
(cherry picked from commit df98c06057ed398572154d02cab891c7258dd60a)
|
|
Tested on Novatel USB1000:
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] QMI Device supports 6 services:
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] ctl (1.0)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] wds (1.1)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] dms (1.1)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] nas (1.0)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] wms (1.0)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] pds (1.0)
(cherry picked from commit 927f794d59c7b192051fbf9673517762e0d61d4b)
|
|
But you usually need a CDMA/EVDO capable device and firmware to
use it. Tested on Novatel USB1000:
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] QMI Device supports 6 services:
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] ctl (1.0)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] wds (1.1)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] dms (1.1)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] nas (1.0)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] wms (1.0)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] pds (1.0)
(cherry picked from commit ca2b6da59deea8650d442bc1b18c313b780d6f16)
|
|
But of course you need a CDMA/EVDO capable device and firmware version
to read it. Tested on Novatel USB1000:
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] QMI Device supports 6 services:
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] ctl (1.0)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] wds (1.1)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] dms (1.1)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] nas (1.0)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] wms (1.0)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] pds (1.0)
(cherry picked from commit ed186950dc4040abee93fbdc8dee980997121ff0)
|
|
Tested on Novatel USB1000:
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] QMI Device supports 6 services:
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] ctl (1.0)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] wds (1.1)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] dms (1.1)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] nas (1.0)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] wms (1.0)
[07 Sep 2016, 10:43:19] [Debug] [/dev/cdc-wdm1] pds (1.0)
(cherry picked from commit 3823e1b0466d6987d13da3e33f51aa5f34afcd55)
|
|
|
|
|
|
|
|
|
|
|
|
We provide a compatibility symbol to try to provide a better backwards
compatibility.
(cherry picked from commit d8430a86f28ca15240c925cd7a0ef18218e6f727)
|
|
Commit 7ca279e9a42 introduced a couple of method renames that we now try to
recover in order to provide a better backwards API compatibility.
(cherry picked from commit baecd3da83e76d51868b4d6160574b10765a7eb9)
|
|
The current definition of QMI_*_BAND_CAPABILITY_BC_15 gets converted to a
negative value (0xffffffff80000000) which causes false positives for BC15
to be returned from dms_add_qmi_bands() and nas_add_qmi_bands() in
ModemManager/src/mm-modem-helpers-qmi.c when a matching QMI band (e.g.
WCDMA900) is present in qmi_bands like in this example
https://lists.freedesktop.org/archives/libqmi-devel/2016-March/001572.html .
Replace 1 << 31 with ((guint64) 1) << 31 for QMI_*_BAND_CAPABILITY_BC_15
to avoid incorrect mmcli "Bands | supported: 'cdma-bc15-aws, ...'" output.
Signed-off-by: Reinhard Speyerer <rspmn@arcor.de>
(cherry picked from commit 0f7849ce05f3e26283652c20e5392161c1cfeeaf)
|
|
The license in this source file wasn't updated as all the others because it was
cherry-picked later on from an old branch.
Reported by Michael Biebl <mbiebl@gmail.org>
(cherry picked from commit 2bce0d44d5e11d9465bc32b97dc0241b47ab2715)
|
|
Based on an equivalent patch from Philip Withnall <philip@tecnocode.co.uk>
for libmbim; see:
https://bugs.freedesktop.org/show_bug.cgi?id=94639
(cherry picked from commit 2b9ed332357d0ddf8a4fc4ffd7a5c0ec8c3126eb)
|
|
The @enum_name@_build_string_from_mask template in
qmi-flags64-types-template.c uses a local gulong number variable.
On platforms where sizeof(gulong) < sizeof(Qmi*BandCapability) this
may cause bands to be missing from qmicli output or incorrect bands
to be contained in the output. Replace gulong number with guint64
number to fix this.
Signed-off-by: Reinhard Speyerer <rspmn@arcor.de>
(cherry picked from commit 3df66e941cfd1c14fdcf7dac67c17c6eb0de6ca6)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Use -z and -n consistently.
|
|
|
|
Found by John.
https://bugs.freedesktop.org/show_bug.cgi?id=94083
|
|
BCD PLMNs with 2 digit MNCs will have an 'F' digit between
the MCC and the MNC. This maps to \0, which would cause
a truncated result string with only the MCC.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
|
|
This is not an official release, just an easy way to identify when the new
support for the UIM PIN actions was introduced.
|
|
|
|
|
|
|
|
|
|
|
|
This is not an official release, just an easy way to identify when the new
support for the 'kernel expected data format' getter/setter were introduced.
|
|
In new kernels, updating expected LLP is a valid operation. If so, we prefer
changing the expected LLP in the kernel instead of in the device, because new
chipsets like the MC7455 only do raw-ip.
|
|
These new actions allow to query or update the data format expected by the
kernel in the WWAN interface associated to the cdc-wdm device used.
|
|
Userspace is in charge of defining the data format to be used in the WWAN net
interface, both in the device itself (e.g. through CTL or WDA requests) and also
in the kernel (e.g. through /sys/class/net/<WWAN>/qmi/raw_ip sysfs files).
These new API methods allow to query and modify the data format expected by the
kernel.
|
|
|