mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-02 10:00:13 +01:00
wifi: really fix crash during dispose of NMDeviceWifi
The right fix is to return from _scan_kickoff() right away. Backtrace: #0 0x00007f520eeb2002 g_logv (libglib-2.0.so.0 + 0x5a002) #1 0x00007f520eeb2273 g_log (libglib-2.0.so.0 + 0x5a273) #2 0x000056026929b25a nm_supplicant_interface_get_max_scan_ssids (NetworkManager + 0x27e25a) #3 0x00007f520c238bb1 _scan_request_ssids_build_hidden (libnm-device-plugin-wifi.so + 0x15bb1) #4 0x00007f520c23a2d5 _scan_notify_is_scanning (libnm-device-plugin-wifi.so + 0x172d5) #5 0x00007f520c2433d3 dispose (libnm-device-plugin-wifi.so + 0x203d3) #6 0x00007f520efa3c78 g_object_unref (libgobject-2.0.so.0 + 0x18c78) #7 0x00005602690ada1a remove_device (NetworkManager + 0x90a1a) #8 0x00005602690be428 nm_manager_stop (NetworkManager + 0xa1428) #9 0x0000560269064adb main (NetworkManager + 0x47adb) #10 0x00007f520ec70042 __libc_start_main (libc.so.6 + 0x27042) #11 0x0000560269064efe _start (NetworkManager + 0x47efe) Fixes:e07fc217ec('wifi: rework scanning of Wi-Fi device') Fixes:a2deb0da5e('wifi: fix crash during dispose of NMDeviceWifi') (cherry picked from commit2794f3cff8)
This commit is contained in:
parent
db68ebd41c
commit
c81f599b04
1 changed files with 6 additions and 1 deletions
|
|
@ -1534,7 +1534,7 @@ _scan_request_ssids_build_hidden (NMDeviceWifi *self,
|
|||
gboolean *out_has_hidden_profiles)
|
||||
{
|
||||
NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
|
||||
guint max_scan_ssids = priv->sup_iface ? nm_supplicant_interface_get_max_scan_ssids (priv->sup_iface) : 0u;
|
||||
guint max_scan_ssids = nm_supplicant_interface_get_max_scan_ssids (priv->sup_iface);
|
||||
gs_free NMSettingsConnection **connections = NULL;
|
||||
gs_unref_ptrarray GPtrArray *ssids = NULL;
|
||||
gs_unref_hashtable GHashTable *unique_ssids = NULL;
|
||||
|
|
@ -1688,6 +1688,11 @@ _scan_kickoff (NMDeviceWifi *self)
|
|||
gint64 now_msec;
|
||||
gint64 ratelimit_duration_msec;
|
||||
|
||||
if (!priv->sup_iface) {
|
||||
_LOGT_scan ("kickoff: don't scan (has no supplicant interface)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (priv->scan_request_cancellable) {
|
||||
_LOGT_scan ("kickoff: don't scan (has scan_request_cancellable)");
|
||||
/* We are currently waiting for a scan request to complete. Wait longer. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue