3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2025-02-16 23:40:43 +01:00
Andrew Zaborowski 4e9dc77b2d scan: Cancel CMD_TRIGGER_SCAN when removing scan context
Save the ids of the netlink trigger scan commands that we send and
cancel them in scan_ifindex_remove to fix a race leading to a
segfault.  The segfault would happen every time if scan_ifindex_remove
was called in the same main loop iteration in which we sent the
command, on shutdown:

^CTerminate
src/netdev.c:netdev_free() Freeing netdev wlan3[6]
src/device.c:device_disassociated() 6
src/device.c:device_enter_state() Old State: connected, new state:
disconnected
src/device.c:device_enter_state() Old State: disconnected, new state:
autoconnect
src/scan.c:scan_periodic_start() Starting periodic scan for ifindex: 6
src/device.c:device_free()
src/device.c:bss_free() Freeing BSS 02:00:00:00:00:00
src/device.c:bss_free() Freeing BSS 02:00:00:00:01:00
Removing scan context for ifindex: 6
src/scan.c:scan_context_free() sc: 0x5555557ca290
src/scan.c:scan_notify() Scan notification 33
src/netdev.c:netdev_operstate_down_cb() netdev: 6, success: 1
src/scan.c:scan_periodic_done()
src/scan.c:scan_periodic_done() Periodic scan triggered for ifindex:
1434209520

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000064 in ?? ()
(gdb) bt
 #0  0x0000000000000064 in ?? ()
 #1  0x0000555555583560 in process_unicast (nlmsg=0x7fffffffc1a0,
     genl=0x5555557c1d60) at ell/genl.c:390
 #2  received_data (io=<optimized out>, user_data=0x5555557c1d60)
     at ell/genl.c:506
 #3  0x0000555555580d45 in io_callback (fd=<optimized out>,
     events=1, user_data=0x5555557c1e60) at ell/io.c:120
 #4  0x000055555558005f in l_main_run () at ell/main.c:381
 #5  0x00005555555599c1 in main (argc=<optimized out>, argv=<optimized out>)
     at src/main.c:259
2017-02-02 12:28:28 -06:00
..
2016-06-10 09:26:56 -05:00
2016-04-13 14:08:10 -05:00
2016-04-13 14:08:10 -05:00
2016-06-08 11:08:10 -05:00
2016-06-08 11:08:10 -05:00
2016-11-15 15:39:55 -06:00
2016-11-03 22:19:46 -05:00
2016-11-30 12:44:13 -06:00
2016-12-14 22:56:56 -06:00
2017-01-31 12:04:26 -06:00
2017-02-01 10:02:14 -06:00
2017-02-01 10:02:14 -06:00
2016-10-24 11:10:23 -05:00
2016-10-24 11:10:26 -05:00
2016-11-02 15:44:19 -05:00
2016-11-15 16:44:07 -06:00
2015-03-29 20:27:57 -05:00
2016-09-21 16:20:09 -05:00
2016-07-20 15:29:39 -05:00
2016-06-10 09:59:59 -05:00
2016-06-10 09:59:59 -05:00
2017-01-31 11:50:06 -06:00
2016-09-22 15:28:29 -05:00
2016-09-22 15:28:29 -05:00
2016-09-13 14:53:30 -05:00