3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-10-04 02:18:49 +02:00

station: Disconnect netdev in station_free()

Call netdev_disconnect() to make netdev forget any of station.c's
callbacks for connections or transitions in progress or established.
Otherwise station.c will crash as soon as we're connected and try to
change interface mode:
==17601== Invalid read of size 8
==17601==    at 0x11DFA0: station_disconnect_event (station.c:775)
==17601==    by 0x11DFA0: station_netdev_event (station.c:1570)
==17601==    by 0x115D18: netdev_disconnect_event (netdev.c:868)
==17601==    by 0x115D18: netdev_mlme_notify (netdev.c:3403)
==17601==    by 0x14E287: l_queue_foreach (queue.c:441)
==17601==    by 0x1558B4: process_multicast (genl.c:469)
==17601==    by 0x1558B4: received_data (genl.c:532)
==17601==    by 0x152888: io_callback (io.c:123)
==17601==    by 0x151BCD: l_main_iterate (main.c:376)
==17601==    by 0x151C9B: l_main_run (main.c:423)
==17601==    by 0x10FE20: main (main.c:489)
This commit is contained in:
Andrew Zaborowski 2018-09-22 18:48:23 +02:00 committed by Denis Kenzior
parent f9faeed7bb
commit daf248e1ba

View File

@ -2249,6 +2249,9 @@ void station_free(struct station *station)
if (!l_queue_remove(station_list, station))
return;
if (station->connected_bss)
netdev_disconnect(station->netdev, NULL, NULL);
periodic_scan_stop(station);
if (station->signal_agent) {