Commit Graph
23 Commits
Author SHA1 Message Date
Lubomir Rintel 90ea3ef5db iface-modem-3gpp-profile-manager: correct a GError instance ownership
The call to g_task_return_error() takes ownership of the GError passed
to it; we must not free it ourselves upon automatic pointer cleanup.

Otherwise a crash can be triggered in the error handling path:

  ModemManager[259816]: <debug> [1633088468.157848] [modem0/modemu/at] <-- '<CR><LF>OK<CR><LF>'
  ModemManager[259816]: <debug> [1633088468.159832] [modem0] stored profile with id '1'
  ModemManager[259816]: <debug> [1633088468.160501] [modem0] set profile state (7/8): list after
  ModemManager[259816]: <debug> [1633088468.161686] [modem0/modemu/at] device open count is 3 (open)
  ModemManager[259816]: <debug> [1633088468.162320] [modem0/modemu/at] device open count is 2 (close)
  ModemManager[259816]: <debug> [1633088468.162746] [modem0/modemu/at] --> 'AT+CGDCONT?<CR>'
  ModemManager[259816]: <debug> [1633088468.177437] [modem0/modemu/at] <-- '<CR><LF>ERROR<CR><LF>'
  ModemManager[259816]: <debug> [1633088468.178011] [modem0/modemu/at] operation failure: 100 (Unknown error)
  ModemManager[259816]: <warn>  [1633088468.182420] [modem0/bearer0] connection attempt #1 failed: Couldn't validate update of profile '1': Unknown error
  ModemManager[259816]: <info>  [1633088468.193156] [modem0/bearer0] connection #1 finished: duration 0s, tx: 0 bytes, rx: 0 bytes
  ModemManager[259816]: <debug> [1633088468.194280] [modem0] couldn't connect bearer: Couldn't validate update of profile '1': Unknown error
  ==259816== Invalid read of size 4
  ==259816==    at 0x4FF66CF: UnknownInlinedFun (gerror.c:535)
  ==259816==    by 0x4FF66CF: g_error_free (gerror.c:832)
  ==259816==    by 0x1A7F49: UnknownInlinedFun (glib-autocleanups.h:52)
  ==259816==    by 0x1A7F49: UnknownInlinedFun (glib-autocleanups.h:52)
  ==259816==    by 0x1A7F49: profile_manager_get_profile_after_ready (mm-iface-modem-3gpp-profile-manager.c:140)
  ==259816==    by 0x4E342C9: g_task_return_now (gtask.c:1219)
  ==259816==    by 0x4E344CA: UnknownInlinedFun (gtask.c:1289)
  ==259816==    by 0x4E344CA: g_task_return (gtask.c:1245)
  ==259816==    by 0x1A867C: get_profile_list_ready (mm-iface-modem-3gpp-profile-manager.c:680)
  ==259816==    by 0x4E342C9: g_task_return_now (gtask.c:1219)
  ==259816==    by 0x4E344CA: UnknownInlinedFun (gtask.c:1289)
  ==259816==    by 0x4E344CA: g_task_return (gtask.c:1245)
  ==259816==    by 0x1A3DB5: internal_list_profiles_ready (mm-iface-modem-3gpp-profile-manager.c:774)
  ==259816==    by 0x4E342C9: g_task_return_now (gtask.c:1219)
  ==259816==    by 0x4E344CA: UnknownInlinedFun (gtask.c:1289)
  ==259816==    by 0x4E344CA: g_task_return (gtask.c:1245)
  ==259816==    by 0x1D7B8B: profile_manager_cgdcont_query_ready (mm-broadband-modem.c:10240)
  ==259816==    by 0x4E1DB61: g_simple_async_result_complete (gsimpleasyncresult.c:802)
  ==259816==  Address 0x9286da0 is 0 bytes inside a block of size 16 free'd
  ==259816==    at 0x48440E4: free (vg_replace_malloc.c:755)
  ==259816==    by 0x500FD1C: g_free (gmem.c:199)
  ==259816==    by 0x502A22F: g_slice_free1 (gslice.c:1180)
  ==259816==    by 0x4FF6780: g_error_free (gerror.c:864)
  ==259816==    by 0x1B22D2: connect_bearer_ready (mm-iface-modem-simple.c:286)
  ==259816==    by 0x4E342C9: g_task_return_now (gtask.c:1219)
  ==259816==    by 0x4E344CA: UnknownInlinedFun (gtask.c:1289)
  ==259816==    by 0x4E344CA: g_task_return (gtask.c:1245)
  ==259816==    by 0x18031A: connect_ready (mm-base-bearer.c:917)
  ==259816==    by 0x4E342C9: g_task_return_now (gtask.c:1219)
  ==259816==    by 0x4E344CA: UnknownInlinedFun (gtask.c:1289)
  ==259816==    by 0x4E344CA: g_task_return (gtask.c:1245)
  ==259816==    by 0x18329B: connect_3gpp_ready (mm-broadband-bearer.c:918)
  ==259816==    by 0x4E342C9: g_task_return_now (gtask.c:1219)
  ==259816==  Block was alloc'd at
  ==259816==    at 0x484186F: malloc (vg_replace_malloc.c:380)
  ==259816==    by 0x5013408: g_malloc (gmem.c:106)
  ==259816==    by 0x502ACB4: g_slice_alloc (gslice.c:1069)
  ==259816==    by 0x502B33D: g_slice_alloc0 (gslice.c:1095)
  ==259816==    by 0x4FF64E6: g_error_allocate (gerror.c:702)
  ==259816==    by 0x4FF6F03: UnknownInlinedFun (gerror.c:716)
  ==259816==    by 0x4FF6F03: g_error_copy (gerror.c:886)
  ==259816==    by 0x4E1D0A0: g_simple_async_result_set_from_error (gsimpleasyncresult.c:676)
  ==259816==    by 0x236AAB: port_serial_got_response (mm-port-serial.c:744)
  ==259816==    by 0x23B0F1: UnknownInlinedFun (mm-port-serial.c:934)
  ==259816==    by 0x23B0F1: common_input_available (mm-port-serial.c:1035)
  ==259816==    by 0x500AF9E: UnknownInlinedFun (gmain.c:3337)
  ==259816==    by 0x500AF9E: g_main_context_dispatch (gmain.c:4055)
  ==259816==    by 0x505F607: g_main_context_iterate.constprop.0 (gmain.c:4131)
  ==259816==    by 0x500A562: g_main_loop_run (gmain.c:4329)
2021-10-03 13:36:54 +00:00
Lubomir Rintel e3d108de0f broadband-modem: ensure mm_broadband_modem_create_device_identifier() sets an error on all bad returns
modem_load_device_identifier_finish() expect it to do so and trips an
assertion failure in g_propagate_error():

  ModemManager[256038]: <warn>  [1633083601.491190] [modem0] couldn't load equipment identifier: Unknown error
  ModemManager[256038]: <debug> [1633083601.491204] [modem0] loading device identifier...
  ModemManager[256038]: <debug> [1633083601.491215] [modem0/modemu/at] device open count is 3 (open)
  ModemManager[256038]: <debug> [1633083601.491231] [modem0/modemu/at] device open count is 2 (close)
  ModemManager[256038]: <debug> [1633083601.491254] [modem0/modemu/at] --> 'ATI<CR>'
  ModemManager[256038]: <debug> [1633083601.494616] [modem0/modemu/at] <-- '<CR><LF>ERROR<CR><LF>'
  ModemManager[256038]: <debug> [1633083601.494643] [modem0/modemu/at] operation failure: 100 (Unknown error)

  (ModemManager:256038): GLib-CRITICAL **: 06:20:01.494: g_propagate_error: assertion 'src != NULL' failed

  Thread 1 "ModemManager" received signal SIGTRAP, Trace/breakpoint trap.
  g_logv (log_domain=0x7ffff77d1071 "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=<optimized out>) at ../glib/gmessages.c:1413
  1413		  g_private_set (&g_log_depth, GUINT_TO_POINTER (depth));
  Missing separate debuginfos, use: dnf debuginfo-install libmbim-1.26.0-2.el9.x86_64 libqmi-1.30.2-1.el9.x86_64
  (gdb) bt
  #0  g_logv (log_domain=0x7ffff77d1071 "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=<optimized out>) at ../glib/gmessages.c:1413
  #1  0x00007ffff77813d3 in g_log (log_domain=<optimized out>, log_level=<optimized out>, format=<optimized out>) at ../glib/gmessages.c:1451
  #2  0x000055555561122d in modem_load_device_identifier_finish (self=0x5555557e62d0, res=<optimized out>, error=0x7fffffffd320)
      at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-broadband-modem.c:1168
  #3  0x00005555555ea69a in load_device_identifier_ready (self=0x5555557e62d0, res=0x5555557ea6b0, task=task@entry=0x7fffe8011e20 [GTask])
      at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-iface-modem.c:4727
  #4  0x00007ffff7951b62 in g_simple_async_result_complete (simple=0x5555557ea6b0 [GSimpleAsyncResult]) at ../gio/gsimpleasyncresult.c:802
  #5  0x00005555555d1b0a in at_sequence_parse_response (port=<optimized out>, res=<optimized out>, ctx=ctx@entry=0x5555557ed7f0)
      at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-base-modem-at.c:250
  #6  0x00007ffff7951b62 in g_simple_async_result_complete (simple=0x5555557e5440 [GSimpleAsyncResult]) at ../gio/gsimpleasyncresult.c:802
  #7  0x00005555556805dc in serial_command_ready (port=<optimized out>, res=<optimized out>, simple=simple@entry=0x5555557e5440 [GSimpleAsyncResult])
      at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-port-serial-at.c:378
  #8  0x00007ffff7951b62 in g_simple_async_result_complete (simple=0x5555557d6730 [GSimpleAsyncResult]) at ../gio/gsimpleasyncresult.c:802
  #9  0x000055555567fb35 in command_context_complete_and_free (ctx=ctx@entry=0x7fffe800c200, idle=idle@entry=0) at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-port-serial.c:141
  #10 0x0000555555682a96 in port_serial_got_response (self=0x5555557dd4e0 [MMPortSerialAt], parsed_response=0x0, error=0x5555557d5040)
      at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-port-serial.c:755
  #11 0x00005555556870d2 in parse_response_buffer (self=<optimized out>) at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-port-serial.c:934
  #12 common_input_available (self=0x5555557dd4e0 [MMPortSerialAt], condition=(G_IO_NVAL | unknown: 0xf762a5c0)) at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-port-serial.c:1035
  #13 0x00007ffff7778f9f in g_main_dispatch (context=0x5555557527c0) at ../glib/gmain.c:3337
  #14 g_main_context_dispatch (context=0x5555557527c0) at ../glib/gmain.c:4055
  #15 0x00007ffff77cd608 in g_main_context_iterate.constprop.0 (context=0x5555557527c0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4131
  #16 0x00007ffff7778563 in g_main_loop_run (loop=0x55555576da60) at ../glib/gmain.c:4329
  #17 0x00005555555b7b60 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/main.c:216
2021-10-03 13:13:21 +00:00
Lubomir Rintel 50fc46c170 bearer-qmi: do not call cleanup_event_report_unsolicited_events() w/o indication_id
If a disconnection fails (because stop_network() failed), base-bearer
flips the state back to CONNECTED. Oops. At that point something is
clearly messed up, but it seems correct to assume the bearer is
connected.

Nevertheless, we will have already have unhooked the unsolicited events
reporting. A subsequent attempt to disconnect the bearer will trip the
assertion:

  #0  0x00007ffff75f2eb5 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
  #1  0x00007ffff75dd895 in __GI_abort () at abort.c:79
  #2  0x00007ffff77beb53 in g_assertion_message
      (domain=<optimized out>, file=<optimized out>, line=<optimized out>, func=0x5088e0 <__FUNCTION__.56253> "cleanup_event_report_unsolicited_events", message=<optimized out>) at ../glib/gtestutils.c:2878
  #3  0x00007ffff781a96f in g_assertion_message_expr
      (domain=domain@entry=0x0, file=file@entry=0x507aad "mm-bearer-qmi.c", line=line@entry=1138, func=func@entry=0x5088e0 <__FUNCTION__.56253> "cleanup_event_report_unsolicited_events", expr=expr@entry=0x507ae5 "*indication_id != 0") at ../glib/gtestutils.c:2904
  #4  0x00000000004a0c49 in cleanup_event_report_unsolicited_events (client=<optimized out>, indication_id=0x5bb30c, self=<optimized out>)
      at mm-bearer-qmi.c:1138
  #5  0x00000000004a0c49 in cleanup_event_report_unsolicited_events
      (client=<optimized out>, indication_id=indication_id@entry=0x5bb30c, self=0x5bb420 [MMBearerQmi]) at mm-bearer-qmi.c:1132
  #6  0x00000000004a0ee3 in disconnect_context_step (task=0x7fffe8012100 [GTask]) at mm-bearer-qmi.c:1854
  #7  0x000000000046e889 in disconnect_auth_ready (self=<optimized out>, res=<optimized out>, ctx=ctx@entry=0x654630)
      at mm-iface-modem-simple.c:865
  #8  0x00007ffff79cfa9a in g_task_return_now (task=0x7fffe8012640 [GTask]) at ../gio/gtask.c:1209
  ...

Add checks for indication_id to calls to
cleanup_event_report_unsolicited_events() on
DISCONNECT_STEP_STOP_NETWORK_IPV4 or DISCONNECT_STEP_STOP_NETWORK_IPV6, as
is done elsewhere.
2019-05-14 09:49:15 +02:00
Lubomir Rintel eaaf64ffce base-bearer: fix check for cancellation
If we cancel connect_cancellable, the connect task will return a
G_IO_ERROR_CANCELLED. We may need to do some cleanup (like, disconnect
if the connection went far enough to actually start the network
connection), thus it's important we check for cancellation correctly.
2019-05-14 09:47:54 +02:00
Lubomir Rintel aaea6c77f2 bearer-qmi: remove unused DisconnectContext::data 2019-05-14 09:46:46 +02:00
Lubomir Rintel dbfc03d9ac docs/ModemManager.8: document --filter-policy option 2018-08-06 13:48:05 +02:00
Lubomir Rintel b56cd74ab5 docs: move mmcli(8) to section 1
Section (8) is for tools that require root privileges.
2018-08-06 13:34:09 +02:00
Lubomir Rintel cf3f3ffcd0 service: set User=root so that gio doesn't have to look into /etc/passwd
GVfs' libgvfsdbus.so GIo module, when automatically loaded, attempts to
discover if there's a session D-Bus instance to use. It tries real hard
to get the socket name it would use -- in absence of XDG_RUNTIME_DIR it
decides to make it up with user's home directory. When HOME is unset
too, it just tries to figure it out by looking into /etc/passwd. Which
upsets SELinux that would better not see us looking into it.

We trigger the load of the GIo modules, by using the GFile API to access
the the ports in /dev. They're utterly uesless to us, but there doesn't
seem to be a way to disable their load. Oh well.

For now, let's just ensure HOME is set and the problematic path in glib
is not taken.
2018-06-13 10:32:51 +00:00
Lubomir Rintel b39dd2ec05 all: drop unused variables
Keeps build with GCC 8 happy.

mm-base-call.c:758:18: warning: variable 'response' set but not used [-Wunused-but-set-variable]
mm-base-call.c:822:18: warning: variable 'response' set but not used [-Wunused-but-set-variable]
mm-base-sms.c:908:18: warning: variable 'response' set but not used [-Wunused-but-set-variable]
mm-sms-list.c:331:25: warning: variable 'ctx' set but not used [-Wunused-but-set-variable]
mm-iface-modem-messaging.c:1210:21: warning: variable 'storage_ctx' set but not used [-Wunused-but-set-variable]
huawei/mm-plugin-huawei.c:183:18: warning: variable 'response' set but not used [-Wunused-but-set-variable]
ublox/mm-plugin-ublox.c:161:24: warning: variable 'response' set but not used [-Wunused-but-set-variable]
ublox/mm-plugin-ublox.c:159:24: warning: variable 'ctx' set but not used [-Wunused-but-set-variable]
icera/mm-modem-helpers-icera.c:218:25: warning: variable 'first_free' set but not used [-Wunused-but-set-variable]
novatel/mm-common-novatel.c:50:18: warning: variable 'response' set but not used [-Wunused-but-set-variable]
2018-04-24 18:11:15 +02:00
Lubomir Rintel ccea14ac47 systemd: tighten the service security a bit
What's left enabled:

* Access to /dev -- obviously
* CAP_SYS_ADMIN -- this is needed by TIOCSSERIAL only. Too bad this also
  allows TIOCSTI, which allows for code injection unless something else
  (SELinux) disallows access to ttys with shells.
  Maybe kernel should use CAP_SYS_TTY_CONFIG for this.
* socket(AF_NETLINK) -- udev & kernel device changes
* socket(AF_UNIX) -- D-Bus
2016-10-24 13:15:15 +02:00
Lubomir Rintel 5a43f90a48 plugins: only export useful symbols
This should avoid poluting the name space and also make module loading
faster.
2016-10-12 10:59:18 +02:00
Lubomir Rintel 6dc08a69ad build: limit the available glib functionality to the version we support
Otherwise we can accidentally use something that we ought not. Also,
there's deprecation warnings for stuff that's not deprecated in the
version we support yet:

  mm-modem-simple.c: In function 'mm_modem_simple_connect_finish':
  mm-modem-simple.c:117:5: warning: 'g_simple_async_result_propagate_error' is deprecated [-Wdeprecated-declarations]
       if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (res), error))
       ^~
2016-10-12 10:45:28 +02:00
Lubomir Rintel 30f60de7d3 blacklist: include some more Arduinos
All "2a03  dog hunter AG" devices seem to be Arduinos.

https://bugzilla.redhat.com/show_bug.cgi?id=1261040
2016-07-27 09:33:22 +02:00
Lubomir Rintel a7942177c9 build: don't disable the aliasing checks
We now don't break the strict aliasing rules.

Also, having a compiler flag that disables a warning among the flags that are
meant to add extra sanity checking is not correct either:
--enable-extra-warnings=no would generate a bad aliasin warning while
the --enable-extra-warnings=yes would not.
2016-07-21 09:49:34 +02:00
Lubomir Rintel 488992b010 qcdm: avoid upsetting the compiler with wrong aliasing
We shouldn't be accessiing u_int8_t * as u_int16_t *. Let's construct
the 16-bit value by or-ing the 8-bit halves directly; avoiding the
endianness conversion too.
2016-07-21 09:49:34 +02:00
Lubomir Rintel e27f4a6226 mbm: clean up the context on activate_ready
Otherwise the dangling pointer to the context that's being deallocated causes a
crash on spontaneous E2NAP receipt:

  ModemManager[1567]: <info>  [1462468083.031326] [mm-iface-modem.c:1431] __iface_modem_update_state_internal(): Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> registered)
  ModemManager[1567]: <debug> [1462468083.053745] [mm-port-serial-at.c:459] debug_log(): (ttyACM0): <-- '<CR><LF>*E2NAP: 0,36<CR><LF>'
  ModemManager[1567]: <debug> [1462468083.053857] [mbm/mm-broadband-modem-mbm.c:824] e2nap_received(): disconnected

  (ModemManager:1567): GLib-GIO-CRITICAL **: g_simple_async_result_set_error: assertion 'G_IS_SIMPLE_ASYNC_RESULT (simple)' failed

  Program received signal SIGTRAP, Trace/breakpoint trap.
  g_logv (log_domain=0x7ffff7086798 "GLib-GIO", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffffffcda0) at gmessages.c:1046
  1046              g_private_set (&g_log_depth, GUINT_TO_POINTER (depth));
  Missing separate debuginfos, use: debuginfo-install libmbim-1.12.4-2.el7.centos.x86_64 libqmi-1.14.2-1.el7.centos.x86_64
  (gdb) bt
  #0  0x00007ffff6a508c3 in g_logv (log_domain=0x7ffff7086798 "GLib-GIO", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffffffcda0) at gmessages.c:1046
  #1  0x00007ffff6a50a3f in g_log (log_domain=log_domain@entry=0x7ffff7086798 "GLib-GIO", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7ffff6abe73d "%s: assertion '%s' failed") at gmessages.c:1079
  #2  0x00007ffff6a50a79 in g_return_if_fail_warning (log_domain=log_domain@entry=0x7ffff7086798 "GLib-GIO", pretty_function=pretty_function@entry=0x7ffff7092ce0 <__FUNCTION__.13394> "g_simple_async_result_set_error", expression=expression@entry=0x7ffff7092a40 "G_IS_SIMPLE_ASYNC_RESULT (simple)") at gmessages.c:1088
  #3  0x00007ffff6ff9d3d in g_simple_async_result_set_error (simple=0x7fffe8006e40, domain=297, code=0, format=0x7ffff175b53f "Call setup failed") at gsimpleasyncresult.c:719
  #4  0x00007ffff17569ea in report_connection_status (bearer=0x7fffe4008a40 [MMBroadbandBearerMbm], status=MM_BEARER_CONNECTION_STATUS_DISCONNECTED) at mbm/mm-broadband-bearer-mbm.c:174
  #5  0x000055555559c9f1 in mm_base_bearer_report_connection_status (self=0x7fffe4008a40 [MMBroadbandBearerMbm], status=MM_BEARER_CONNECTION_STATUS_DISCONNECTED) at mm-base-bearer.c:1118
  #6  0x00007ffff17548ed in bearer_list_report_status_foreach (bearer=0x7fffe4008a40 [MMBroadbandBearerMbm], ctx=0x7fffffffd060) at mbm/mm-broadband-modem-mbm.c:805
  #7  0x00007ffff6a45f18 in g_list_foreach (list=<optimized out>, func=0x7ffff17548c9 <bearer_list_report_status_foreach>, user_data=0x7fffffffd060) at glist.c:994
  #8  0x00005555555a224b in mm_bearer_list_foreach (self=0x5555558e0680 [MMBearerList], func=0x7ffff17548c9 <bearer_list_report_status_foreach>, user_data=0x7fffffffd060) at mm-bearer-list.c:146
  #9  0x00007ffff1754a3d in e2nap_received (port=0x5555558e24c0 [MMPortSerialAt], info=0x555555935730, self=0x555555900330 [MMBroadbandModemMbm]) at mbm/mm-broadband-modem-mbm.c:850
  #10 0x000055555563d9fd in parse_unsolicited (port=0x5555558e24c0 [MMPortSerialAt], response=0x7fffe80054f0) at mm-port-serial-at.c:280
  #11 0x0000555555639915 in parse_response_buffer (self=0x5555558e24c0 [MMPortSerialAt]) at mm-port-serial.c:889
  #12 0x0000555555639f0b in common_input_available (self=0x5555558e24c0 [MMPortSerialAt], condition=G_IO_IN) at mm-port-serial.c:1019
  #13 0x0000555555639fc7 in iochannel_input_available (iochannel=0x555555926df0, condition=G_IO_IN, data=0x5555558e24c0) at mm-port-serial.c:1042
  #14 0x00007ffff6a4979a in g_main_context_dispatch (context=0x5555558a4a00) at gmain.c:3109
  #15 0x00007ffff6a4979a in g_main_context_dispatch (context=context@entry=0x5555558a4a00) at gmain.c:3708
  #16 0x00007ffff6a49ae8 in g_main_context_iterate (context=0x5555558a4a00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3779
  #17 0x00007ffff6a49dba in g_main_loop_run (loop=0x5555558acf10) at gmain.c:3973
  #18 0x000055555558d068 in main (argc=2, argv=0x7fffffffdc38) at main.c:181
  (gdb)

https://bugzilla.redhat.com/show_bug.cgi?id=1333293
https://bugs.freedesktop.org/show_bug.cgi?id=95303
2016-05-10 16:25:05 -05:00
Lubomir Rintel ff8f030d24 mtk: add D-Link DWM-156 A3 2016-05-04 09:49:43 -05:00
Lubomir Rintel 8fee9a99f0 port-probe: unlink the task from probe before completing it
The task completion may try to enqueue a next probe task and in
mm_port_probe_run() it asserts there's no task linked.

https://bugs.freedesktop.org/show_bug.cgi?id=94664

Fixes: 1939c5ace5
2016-03-22 22:26:16 +01:00
Lubomir Rintel 342ea24e34 cinterion: drop unused constants
GCC 6 doesn't like this. Unused since f2024b7.
2016-03-21 15:05:52 +01:00
Lubomir Rintel 2a5909af17 wmc: fix a typo in the test
GCC 6 notices an unused constant and errors out.
2016-03-21 15:02:41 +01:00
Lubomir Rintel d44690489b udev: Don't mark disconnected RFCOMM ttys as candidates
Bluetooth serial devices are weird. They begin life being bound with
RFCOMMCREATEDEV ioctl() and then move around the sysfs tree when they are
connected and disconnected. The connection is estabilished upon the first
open() and torn down upon last close(), their first user virtually being
"owner" of the connection. We don't want to be that process, we're only
interested in actually connected modems. However, currently we have no
knowledge of that and therefore we connect and disconnect multiple times while
probing.

This patch marks unconnected RFCOMM devices as uninteresting to us.
The actual connection and disconnection will be handled by NetworkManager.
2014-11-01 20:07:40 +01:00
Lubomir Rintel f79ec9bf4d manager: Remove devices which are deemed unfit during addition attempt
device_added() might be called in response to a "change" or "move" attempt that
might have changed a candidate device to a non-candidate one.
2014-11-01 20:07:35 +01:00
Lubomir Rintel b8cd5ae838 device: Keep track of devices as they are move across sysfs
For certain devices the name changes with their status. Notably, RFCOMM
devices move from /devices/virtual/ to underneath the HCI that is used
for the connection as the session is estabilished, and return back when
it's torn down.
2014-11-01 20:07:30 +01:00