NetworkManager/src
Lubomir Rintel 741be402fb modem-broadband: ignore late callbacks
If libmm invokes callbacks after the connect context has been disposed
we should just ignore them. Fixes crash on dereferencing already freed
connect context (due to explicit disconnection while the modem is
connecting):

  NetworkManager[29074]: <info>  [1462383917.8718] (ttyACM1): modem state changed, 'disconnecting' --> 'registered' (reason: user-requested)
  NetworkManager[29074]: <info>  [1462383917.8719] (ttyACM1): modem state changed, 'registered' --> 'connecting' (reason: user-requested)
  NetworkManager[29074]: <info>  [1462383917.8720] device (ttyACM1): state change: deactivating -> disconnected (reason 'connection-removed') [110 30 38]
  NetworkManager[29074]: <info>  [1462383917.8758] (ttyACM1): modem state changed, 'connecting' --> 'disconnecting' (reason: user-requested)
  NetworkManager[29074]: <warn>  [1462383917.8909] (ttyACM1): failed to connect modem: Dial operation has been cancelled

  (NetworkManager:29074): NetworkManager-wwan-CRITICAL **: modem_prepare_result: assertion 'state == NM_DEVICE_STATE_PREPARE' failed
  NetworkManager[29074]: <info>  [1462383917.8912] (ttyACM1): modem state changed, 'disconnecting' --> 'registered' (reason: user-requested)
  NetworkManager[29074]: <info>  [1462383917.8913] (ttyACM1): modem state changed, 'registered' --> 'connecting' (reason: user-requested)
  NetworkManager[29074]: <info>  [1462383917.9693] (ttyACM1): modem state changed, 'connecting' --> 'registered' (reason: user-requested)

  Program received signal SIGSEGV, Segmentation fault.
  connect_ready (simple_iface=<optimized out>, res=0x7fffe0009200, self=0x555555a8d670 [NMModemBroadband]) at nm-modem-broadband.c:329
  329                     if (!ctx->first_error) {
  (gdb) bt
  #0  0x00007fffea01272a in connect_ready (simple_iface=<optimized out>, res=0x7fffe0009200, self=0x555555a8d670 [NMModemBroadband]) at nm-modem-broadband.c:329
  #1  0x00007ffff546a297 in g_simple_async_result_complete (simple=0x7fffe0009200 [GSimpleAsyncResult]) at gsimpleasyncresult.c:801
  #2  0x00007fffe9d82fec in connect_context_complete_and_free (ctx=ctx@entry=0x7fffdc00c550) at mm-modem-simple.c:93
  #3  0x00007fffe9d83155 in simple_connect_ready (self=0x7fffdc00c960 [MMModemSimple], res=0x555555a7c2b0, ctx=0x7fffdc00c550) at mm-modem-simple.c:159
  #4  0x00007ffff547af93 in g_task_return_now (task=0x555555a7c2b0 [GTask]) at gtask.c:1106
  #5  0x00007ffff547b62e in g_task_return (task=0x555555a7c2b0 [GTask], type=<optimized out>) at gtask.c:1164
  #6  0x00007ffff54d4239 in reply_cb (connection=<optimized out>, res=<optimized out>, user_data=0x555555a7c2b0) at gdbusproxy.c:2570
  #7  0x00007ffff547af93 in g_task_return_now (task=0x7fffdc004470 [GTask]) at gtask.c:1106
  #8  0x00007ffff547b62e in g_task_return (task=0x7fffdc004470 [GTask], type=<optimized out>) at gtask.c:1164
  #9  0x00007ffff54c8c9f in g_dbus_connection_call_done (source=<optimized out>, result=0x7fffe00036f0, user_data=0x7fffdc004470) at gdbusconnection.c:5702
  #10 0x00007ffff547af93 in g_task_return_now (task=0x7fffe00036f0 [GTask]) at gtask.c:1106
  #11 0x00007ffff547afc9 in complete_in_idle_cb (task=0x7fffe00036f0) at gtask.c:1120
  #12 0x00007ffff4eb7d7a in g_main_context_dispatch (context=0x555555a4a000) at gmain.c:3152
  #13 0x00007ffff4eb7d7a in g_main_context_dispatch (context=context@entry=0x555555a4a000) at gmain.c:3767
  #14 0x00007ffff4eb80b8 in g_main_context_iterate (context=0x555555a4a000, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3838
  #15 0x00007ffff4eb838a in g_main_loop_run (loop=0x555555a48780) at gmain.c:4032
  #16 0x00005555555aebf2 in main (argc=1, argv=0x7fffffffdc78) at main.c:477
  (gdb)

(cherry picked from commit aa0b379699)
2016-05-10 16:53:42 +02:00
..
devices modem-broadband: ignore late callbacks 2016-05-10 16:53:42 +02:00
dhcp-manager core: use nm_utils_machine_id_read() in "nm-dhcp-client.c" 2016-04-26 12:59:20 +02:00
dns-manager dns: avoid using global "/etc/dnsmasq.conf" config for dnsmasq 2016-04-22 13:40:17 +02:00
dnsmasq-manager platform: change @plen field of NMPlatformIPxAddress to type guint8 2016-04-12 11:14:01 +02:00
platform linux-platform: re-read the link type if the name changed 2016-04-29 10:41:58 +02:00
ppp-manager platform: change @plen field of NMPlatformIPxAddress to type guint8 2016-04-12 11:14:01 +02:00
rdisc build: disable deprecation checks for internal compilation 2016-04-05 22:22:58 +02:00
settings settings: don't unload settings plugins on failure 2016-04-29 15:56:20 +02:00
supplicant-manager build: disable deprecation checks for internal compilation 2016-04-05 22:22:58 +02:00
systemd merge: merge branch 'systemd' into master 2016-04-01 15:15:43 +02:00
tests core: add nm_utils_machine_id_read() and parse() util 2016-04-26 12:59:20 +02:00
vpn-manager libnm-core/vpn-connection: get the service for bus path from plugin 2016-04-18 19:01:55 +02:00
main-utils.c main: create parent directories of NMSTATEDIR with permissions 755 2016-03-21 13:31:40 +01:00
main-utils.h main: create parent directories of NMSTATEDIR with permissions 755 2016-03-21 13:31:40 +01:00
main.c main: create parent directories of NMSTATEDIR with permissions 755 2016-03-21 13:31:40 +01:00
Makefile.am core: add nm_utils_machine_id_read() and parse() util 2016-04-26 12:59:20 +02:00
NetworkManager.ver build: hide internal symbols in NetworkManager binary 2016-03-08 17:45:50 +01:00
NetworkManagerUtils.c utils: inject platform into nm_utils_complete_generic() 2016-03-15 12:56:58 +01:00
NetworkManagerUtils.h utils: inject platform into nm_utils_complete_generic() 2016-03-15 12:56:58 +01:00
nm-activation-request.c all: don't include error->code in log messages 2016-03-03 18:54:20 +01:00
nm-activation-request.h core: separate active and applied connection 2015-09-18 17:32:11 +02:00
nm-active-connection.c active-connection: add parent active connection tracking 2016-03-26 11:31:18 +01:00
nm-active-connection.h active-connection: add parent active connection tracking 2016-03-26 11:31:18 +01:00
nm-audit-manager.c audit: use logging helpers 2016-03-04 11:55:41 +01:00
nm-audit-manager.h device: refactor reapply_connection() 2016-01-10 23:14:29 +01:00
nm-auth-manager.c auth: downgrade g_assert() to nm_assert() 2016-04-05 10:39:20 +02:00
nm-auth-manager.h all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-auth-subject.c auth: allow failures to read process start_time from /proc/$PID/stat with hidepid 2016-04-22 14:42:51 +02:00
nm-auth-subject.h all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-auth-utils.c all: don't include error->code in log messages 2016-03-03 18:54:20 +01:00
nm-auth-utils.h manager: export DNS global configuration D-Bus property 2015-10-01 09:05:08 +02:00
nm-bus-manager.c bus-manager: avoid leaking responses for sync bus calls 2016-03-04 19:08:25 +01:00
nm-bus-manager.h all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-config-data.c libnm,core: fix syntax of 'transfer' annotation 2016-02-24 17:23:01 +01:00
nm-config-data.h main: add argument --print-config to NetworkManager 2015-11-22 13:40:32 +01:00
nm-config.c shared: move nm_utils_ascii_str_to_bool() to shared/nm-shared-utils.h 2016-04-19 15:14:17 +02:00
nm-config.h config: implement nm_config_change_flags_to_string() via NM_UTILS_FLAGS2STR_DEFINE() 2016-01-19 11:14:51 +01:00
nm-connection-provider.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-connection-provider.h core: fix interface type names 2015-09-10 13:43:47 -04:00
nm-connectivity.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-connectivity.h all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-core-utils.c core: add nm_utils_machine_id_read() and parse() util 2016-04-26 12:59:20 +02:00
nm-core-utils.h core: add nm_utils_machine_id_read() and parse() util 2016-04-26 12:59:20 +02:00
nm-dcb.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-dcb.h all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-default-route-manager.c Revert "manager: don't remove the device before policy learns of ip config change" 2016-04-04 12:52:56 +02:00
nm-default-route-manager.h default-route-manager: make NMDefaultRouteManager namespace aware 2016-03-15 12:56:58 +01:00
nm-dhcp4-config.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-dhcp4-config.h core: port NMDhcp4Config/NMDhcp6Config to GVariant 2015-07-24 13:25:47 -04:00
nm-dhcp6-config.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-dhcp6-config.h core: port NMDhcp4Config/NMDhcp6Config to GVariant 2015-07-24 13:25:47 -04:00
nm-dispatcher.c dispatcher: use logging helpers 2016-03-04 11:48:04 +01:00
nm-dispatcher.h core: separate active and applied connection 2015-09-18 17:32:11 +02:00
nm-exported-object.c exported-object: reorder includes 2016-04-01 08:58:19 +02:00
nm-exported-object.h exported-object: refactor list of interfaces from GSList to an array 2016-04-01 08:58:18 +02:00
nm-firewall-manager.c core: use defines for signal names in NMDnsManager and NMFirewallManager 2016-04-04 16:48:10 +02:00
nm-firewall-manager.h core: use defines for signal names in NMDnsManager and NMFirewallManager 2016-04-04 16:48:10 +02:00
nm-iface-helper.c platform: change @plen field of NMPlatformIPxRoute to type guint8 2016-04-12 11:14:01 +02:00
nm-ip4-config.c core: expose NMIPAddress instances with prefix zero on D-Bus 2016-04-12 11:16:12 +02:00
nm-ip4-config.h platform: change @plen field of NMPlatformIPxRoute to type guint8 2016-04-12 11:14:01 +02:00
nm-ip6-config.c core: expose NMIPAddress instances with prefix zero on D-Bus 2016-04-12 11:16:12 +02:00
nm-ip6-config.h platform: change @plen field of NMPlatformIPxRoute to type guint8 2016-04-12 11:14:01 +02:00
nm-logging.c logging: add new logging domain "SYSTEMD" for internal systemd logging 2016-03-17 15:00:48 +01:00
nm-logging.h logging: add new logging domain "SYSTEMD" for internal systemd logging 2016-03-17 15:00:48 +01:00
nm-manager.c manager: fix wrongly removing DNS configuration on shutdown 2016-04-20 17:54:24 +02:00
nm-manager.h manager: use defines for signal names 2016-04-04 16:45:48 +02:00
nm-multi-index.c libnm,core: fix syntax of 'transfer' annotation 2016-02-24 17:23:01 +01:00
nm-multi-index.h core: optimize NMMultiIndex by special caseing ids with one value only 2015-12-17 18:42:54 +01:00
nm-policy.c core: use defines for signal names in NMDnsManager and NMFirewallManager 2016-04-04 16:48:10 +02:00
nm-policy.h policy: embed pointer to private data into NMPolicy 2016-04-04 15:47:22 +02:00
nm-rfkill-manager.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-rfkill-manager.h core: skip generating gtype for rfkill enums 2015-08-19 13:49:33 +02:00
nm-route-manager.c platform: change @plen field of NMPlatformIPxRoute to type guint8 2016-04-12 11:14:01 +02:00
nm-route-manager.h route-manager: make NMRouteManager namespace aware 2016-03-15 12:56:58 +01:00
nm-session-monitor.c session-monitor/trivial: rename local functions for unique prefix 2016-03-11 11:12:00 +01:00
nm-session-monitor.h session-monitor: explicitly use singleton instance 2015-08-13 10:06:42 +02:00
nm-sleep-monitor-systemd.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-sleep-monitor-upower.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-sleep-monitor.h all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-types.h rdisc: make NMRDisc namespace aware 2016-03-15 12:56:58 +01:00
org.freedesktop.NetworkManager.conf dns: use DBus to make dnsmasq nameserver changes 2016-04-22 13:39:23 +02:00