NetworkManager/src
Thomas Haller 026389fc1f
supplicant: fix crash in _scan_notify_allowed() when supplicant disconnects
When stopping wpa_supplicant, I got an assertion failure:

  #0  g_logv (log_domain=0x55f8e4a43013 "NetworkManager", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=<optimized out>) at ../glib/gmessages.c:1377
  #1  0x00007f2d33245233 in g_log (log_domain=log_domain@entry=0x55f8e4a43013 "NetworkManager", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7f2d332976ff "%s: assertion '%s' failed") at ../glib/gmessages.c:1415
  #2  0x00007f2d33245a2d in g_return_if_fail_warning (log_domain=log_domain@entry=0x55f8e4a43013 "NetworkManager", pretty_function=pretty_function@entry=0x55f8e4acc1e0 <__func__.14> "nm_supplicant_interface_get_state", expression=expression@entry=0x55f8e4acb450 "NM_IS_SUPPLICANT_INTERFACE (self)") at ../glib/gmessages.c:2771
  #3  0x000055f8e49ab3f2 in nm_supplicant_interface_get_state (self=0x0) at src/supplicant/nm-supplicant-interface.c:2581
  #4  0x00007f2d1f7307a4 in _scan_notify_allowed (self=self@entry=0x55f8e5199cf0 [NMDeviceWifi], do_kickoff=do_kickoff@entry=NM_TERNARY_FALSE) at src/devices/wifi/nm-device-wifi.c:514
  #5  0x00007f2d1f730ed3 in supplicant_iface_state (self=0x55f8e5199cf0 [NMDeviceWifi], new_state=<optimized out>, old_state=NM_SUPPLICANT_INTERFACE_STATE_COMPLETED, disconnect_reason=<optimized out>, is_real_signal=<optimized out>) at src/devices/wifi/nm-device-wifi.c:2492
  #6  0x00007f2d32339af0 in ffi_call_unix64 () at ../src/x86/unix64.S:76
  #7  0x00007f2d323392ab in ffi_call (cif=cif@entry=0x7ffcaf6c3120, fn=fn@entry=0x7f2d1f731920 <supplicant_iface_state_cb>, rvalue=<optimized out>, avalue=avalue@entry=0x7ffcaf6c3050) at ../src/x86/ffi64.c:525
  #12 0x00007f2d3334ac63 in <emit signal ??? on instance 0x55f8e4f49bb0 [NMSupplicantInterface]> (instance=instance@entry=0x55f8e4f49bb0, signal_id=<optimized out>, detail=detail@entry=0) at ../gobject/gsignal.c:3554
      #8  0x00007f2d3333238d in g_cclosure_marshal_generic (closure=closure@entry=0x55f8e521eb10, return_gvalue=return_gvalue@entry=0x0, n_param_values=n_param_values@entry=4, param_values=param_values@entry=0x7ffcaf6c3320, invocation_hint=invocation_hint@entry=0x7ffcaf6c32a0, marshal_data=marshal_data@entry=0x0) at ../gobject/gclosure.c:1500
      #9  0x00007f2d3333188a in g_closure_invoke (closure=0x55f8e521eb10, return_value=return_value@entry=0x0, n_param_values=4, param_values=param_values@entry=0x7ffcaf6c3320, invocation_hint=invocation_hint@entry=0x7ffcaf6c32a0) at ../gobject/gclosure.c:810
      #10 0x00007f2d33344423 in signal_emit_unlocked_R (node=node@entry=0x7f2d200066c0, detail=detail@entry=0, instance=instance@entry=0x55f8e4f49bb0, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7ffcaf6c3320) at ../gobject/gsignal.c:3742
      #11 0x00007f2d3334aaf9 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7ffcaf6c34f0) at ../gobject/gsignal.c:3498
  #13 0x000055f8e49a880b in _emit_signal_state (disconnect_reason=0, old_state=NM_SUPPLICANT_INTERFACE_STATE_COMPLETED, new_state=<optimized out>, self=0x55f8e4f49bb0 [NMSupplicantInterface]) at src/supplicant/nm-supplicant-interface.c:1083
  #14 set_state_down (self=0x55f8e4f49bb0 [NMSupplicantInterface], force_remove_from_supplicant=0, reason=0x55f8e4acd918 "InterfaceRemoved signal from wpa_supplicant") at src/supplicant/nm-supplicant-interface.c:1083
  #15 0x000055f8e49acb0b in _supp_iface_remove_one (self=0x55f8e51990c0 [NMSupplicantManager], supp_iface=0x55f8e4f49bb0 [NMSupplicantInterface], force_remove_from_supplicant=0, reason=0x55f8e4acd918 "InterfaceRemoved signal from wpa_supplicant") at src/supplicant/nm-supplicant-manager.c:1067
  #16 0x000055f8e49accec in _dbus_interface_removed_cb (connection=<optimized out>, sender_name=0x7f2d20038f20 ":1.4741", object_path=<optimized out>, signal_interface_name=<optimized out>, signal_name=<optimized out>, parameters=<optimized out>, user_data=0x55f8e51990c0) at src/supplicant/nm-supplicant-manager.c:902
  #17 0x00007f2d33483c0f in emit_signal_instance_in_idle_cb (data=data@entry=0x7f2d20034750) at ../gio/gdbusconnection.c:3777
  #18 0x00007f2d3323945b in g_idle_dispatch (source=source@entry=0x7f2d20038db0, callback=0x7f2d33483b90 <emit_signal_instance_in_idle_cb>, user_data=0x7f2d20034750) at ../glib/gmain.c:5755
  #19 0x00007f2d3323d78f in g_main_dispatch (context=0x55f8e4ee31e0) at ../glib/gmain.c:3309
  #20 g_main_context_dispatch (context=0x55f8e4ee31e0) at ../glib/gmain.c:3974
  #21 0x00007f2d3323db18 in g_main_context_iterate (context=0x55f8e4ee31e0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4047
  #22 0x00007f2d3323de33 in g_main_loop_run (loop=0x55f8e4ec4d20) at ../glib/gmain.c:4241
  #23 0x000055f8e4755a3b in main (argc=<optimized out>, argv=<optimized out>) at src/main.c:456

Fixes: 7500e90b53 ('wifi: rework scanning of Wi-Fi device')
2020-09-15 15:00:14 +02:00
..
devices supplicant: fix crash in _scan_notify_allowed() when supplicant disconnects 2020-09-15 15:00:14 +02:00
dhcp dhcp: drop "event_id" parameter from NM_DHCP_CLIENT_SIGNAL_STATE_CHANGED signal 2020-09-11 16:18:39 +02:00
dns dns: add new "rc-manager=auto" mode 2020-08-24 21:13:21 +02:00
dnsmasq all: fix minor typos 2020-07-07 11:33:46 +02:00
initrd initrd/tests: fix memleak in test_dhcp_vendor_class_id() 2020-09-03 11:36:39 +02:00
ndisc ndisc/tests: relax assertion in "test-ndisc-fake.c" 2020-07-07 22:32:35 +02:00
platform platform: add support for mcast_hash_max netlink attribute for bridges 2020-09-15 13:41:29 +02:00
ppp license: Add license using SPDX identifiers to meson build files 2020-02-17 13:16:57 +01:00
settings all: replace cleanup macro "gs_unref_keyfile" by "nm_auto_unref_keyfile" 2020-09-02 17:46:43 +02:00
supplicant all: fix minor typos 2020-07-07 11:33:46 +02:00
systemd systemd: merge branch systemd into master 2020-08-13 09:54:41 +02:00
tests all: replace cleanup macro "gs_free_slist" by "nm_auto_free_slist" 2020-09-02 17:46:43 +02:00
vpn core: fix generation of dependent local routes for VRFs 2020-07-15 10:57:49 +02:00
main-utils.c all: use nm_clear_g_free() instead of g_clear_pointer() 2020-03-23 11:05:34 +01:00
main-utils.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
main.c config: print config warnings during NetworkManager --print-config 2019-12-11 11:52:05 +01:00
meson.build l3cfg: implement IPv4 DAD/ACD (address collision detection) in NML3Cfg 2020-09-03 11:52:39 +02:00
NetworkManagerUtils.c core: merge IPv4/IPv6 implementations of nm_utils_ip_{addresses,routes}_to_dbus() 2020-08-05 12:47:55 +02:00
NetworkManagerUtils.h core: add NMDhcpLease typedef and simple accessor functions 2020-09-11 16:18:34 +02:00
nm-act-request.c all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-act-request.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-active-connection.c core: fix check on master active-connection failure 2020-07-17 08:56:28 +02:00
nm-active-connection.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-audit-manager.c shared: nm-auth-subject: add unix-session type 2019-12-24 10:13:51 +01:00
nm-audit-manager.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-auth-manager.c auth-manager: watch PolicyKit name owner to emit changed signal when name owner appears 2020-04-21 12:19:43 +02:00
nm-auth-manager.h shared: move nm-dbus-auth-subject to shared/nm-libnm-core-intern 2019-12-24 10:13:51 +01:00
nm-auth-utils.c all: fix typo in man pages 2020-07-03 10:48:04 +02:00
nm-auth-utils.h all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-checkpoint-manager.c all: use nm_dbus_path_not_empty() 2019-11-07 11:34:36 +01:00
nm-checkpoint-manager.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-checkpoint.c all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-checkpoint.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-config-data.c all: replace cleanup macro "gs_unref_keyfile" by "nm_auto_unref_keyfile" 2020-09-02 17:46:43 +02:00
nm-config-data.h config: add nm_config_data_get_warnings() to get additional warnings about wrong configuration 2019-12-11 11:52:05 +01:00
nm-config.c all: replace cleanup macro "gs_free_slist" by "nm_auto_free_slist" 2020-09-02 17:46:43 +02:00
nm-config.h config: avoid lgtm.com warning about int bitfield for NMConfigDeviceStateData.nm_owned 2020-05-07 13:58:09 +02:00
nm-connectivity.c shared: drop _STATIC variant of macros that define functions 2020-02-13 17:17:07 +01:00
nm-connectivity.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-core-utils.c core: move nm_utils_generate_duid_from_machine_id() to "nm-core-utils.c" 2020-09-11 16:18:36 +02:00
nm-core-utils.h core: move nm_utils_generate_duid_from_machine_id() to "nm-core-utils.c" 2020-09-11 16:18:36 +02:00
nm-dbus-manager.c all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-dbus-manager.h shared: move nm-dbus-auth-subject to shared/nm-libnm-core-intern 2019-12-24 10:13:51 +01:00
nm-dbus-object.c core: accept void pointer in nm_dbus_object_export() and related 2020-09-07 16:11:52 +02:00
nm-dbus-object.h core: accept void pointer in nm_dbus_object_export() and related 2020-09-07 16:11:52 +02:00
nm-dbus-utils.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-dbus-utils.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-dcb.c all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-dcb.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-dhcp-config.c shared,core: rename and move function to nm_utils_strdict_to_variant_asv() 2020-06-19 17:07:26 +02:00
nm-dhcp-config.h core: add common base class NMDhcpConfig for NMDhcp[46]Config and merge them 2020-02-21 15:59:44 +01:00
nm-dispatcher.c device: merge nm_device_get_dhcp[46]_config() to nm_device_get_dhcp_config() 2020-02-21 15:59:44 +01:00
nm-dispatcher.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-firewall-manager.c all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-firewall-manager.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-hostname-manager.c core: avoid deprecated matchfilecon SELinux API instead of selabel 2020-08-17 15:18:03 +02:00
nm-hostname-manager.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-iface-helper.c dhcp: drop "event_id" parameter from NM_DHCP_CLIENT_SIGNAL_STATE_CHANGED signal 2020-09-11 16:18:39 +02:00
nm-ip-config.c core: add NMIPConfig as base class for NMIP[46]Config 2020-08-05 12:47:55 +02:00
nm-ip-config.h core: add NMIPConfig as base class for NMIP[46]Config 2020-08-05 12:47:55 +02:00
nm-ip4-config.c all: avoid wrong compiler warning about uninitalized variables with LTO 2020-08-17 15:18:02 +02:00
nm-ip4-config.h core: add NMIPConfig as base class for NMIP[46]Config 2020-08-05 12:47:55 +02:00
nm-ip6-config.c core: use nm_platform_ip6_address_match() in nm_ip6_config_find_first_address() 2020-09-11 16:18:41 +02:00
nm-ip6-config.h core: add NMIPConfig as base class for NMIP[46]Config 2020-08-05 12:47:55 +02:00
nm-keep-alive.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-keep-alive.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-l3-config-data.c l3cfg: gracefully accept %NULL argument in nm_l3_config_data_lookup_objs() 2020-09-11 16:18:35 +02:00
nm-l3-config-data.h l3cfg: support tracking the DHCP lease in NML3ConfigData 2020-09-11 16:18:34 +02:00
nm-l3cfg.c l3cfg: add nm_l3cfg_get_combined_l3cd() function 2020-09-11 16:18:36 +02:00
nm-l3cfg.h l3cfg: add nm_l3cfg_get_combined_l3cd() function 2020-09-11 16:18:36 +02:00
nm-logging.c all: use nm_clear_g_free() instead of g_clear_pointer() 2020-03-23 11:05:34 +01:00
nm-logging.h core: move _LOG*() macros to "shared/nm-glib-aux/nm-logging-fwd.h" 2019-11-22 15:32:52 +01:00
nm-manager.c settings: rework wait-device-timeout handling and consider device compatibility 2020-08-12 16:40:56 +02:00
nm-manager.h all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-netns.c core: add nm_netns_shared_ip_reserve() API 2020-09-14 17:28:10 +02:00
nm-netns.h core: add nm_netns_shared_ip_reserve() API 2020-09-14 17:28:10 +02:00
nm-pacrunner-manager.c all: drop explicit casts from _GET_PRIVATE() macro calls 2020-02-14 11:04:46 +01:00
nm-pacrunner-manager.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-policy.c core/trivial: replace "XXX" markers with "TODO" 2020-08-27 17:10:55 +02:00
nm-policy.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-proxy-config.c all: use nm_clear_g_free() instead of g_clear_pointer() 2020-03-23 11:05:34 +01:00
nm-proxy-config.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-rfkill-manager.c all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-rfkill-manager.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-session-monitor.c all: use nm_clear_pointer() instead of g_clear_pointer() 2020-03-23 11:22:38 +01:00
nm-session-monitor.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-sleep-monitor.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-sleep-monitor.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-test-utils-core.h libnm/keyfile: build keyfile code as separate GPL licensed internal library 2020-01-07 13:17:47 +01:00
nm-types.h platform: add support for configuring bridge settings via netlink 2020-08-07 13:20:54 +02:00
org.freedesktop.NetworkManager.conf dbus: pretty format "org.freedesktop.NetworkManager.conf" 2020-04-15 19:17:00 +02:00