03475bd01a
Drop scan generation number and node table scan lock - the only place where ni_scangen is checked is in ieee80211_timeout_stations() (and it is used to prevent duplicate checking of the same node); node scan lock protects only this variable + node table scan generation number. This will fix (at least) next LOR (hostap mode): lock order reversal: 1st 0xc175f84c urtwm0_scan_loc (urtwm0_scan_loc) @ /usr/src/sys/modules/wlan/../../net80211/ieee80211_node.c:2019 2nd 0xc175e018 urtwm0_com_lock (urtwm0_com_lock) @ /usr/src/sys/modules/wlan/../../net80211/ieee80211_node.c:2693 stack backtrace: #0 0xa070d1c5 at witness_debugger+0x75 #1 0xa070d0f6 at witness_checkorder+0xd46 #2 0xa0694cce at __mtx_lock_flags+0x9e #3 0xb03ad9ef at ieee80211_node_leave+0x12f #4 0xb03afd13 at ieee80211_timeout_stations+0x483 #5 0xb03aa1c2 at ieee80211_node_timeout+0x42 #6 0xa06c6fa1 at softclock_call_cc+0x1e1 #7 0xa06c7518 at softclock+0xc8 #8 0xa06789ae at intr_event_execute_handlers+0x8e #9 0xa0678fa0 at ithread_loop+0x90 #10 0xa0675fbe at fork_exit+0x7e #11 0xa08af910 at fork_trampoline+0x8 In addition to the above: * switch to ieee80211_iterate_nodes(); * do not assert that node table lock is held, while calling node_age(); that's not really needed (there are no resources, which can be protected by this lock) + this fixes LOR/deadlock between ieee80211_timeout_stations() and ieee80211_set_tim() (easy to reproduce in HOSTAP mode while sending something to an STA with enabled power management). Tested: * (avos) urtwn0, hostap mode * (adrian) AR9380, STA mode * (adrian) AR9380, AR9331, AR9580, hostap mode Notes: * This changes the net80211 internals, so you have to recompile all of it and the wifi drivers. Submitted by: avos Approved by: re (delphij) Differential Revision: https://reviews.freebsd.org/D6833 |
||
---|---|---|
.. | ||
_ieee80211.h | ||
ieee80211_acl.c | ||
ieee80211_action.c | ||
ieee80211_action.h | ||
ieee80211_adhoc.c | ||
ieee80211_adhoc.h | ||
ieee80211_ageq.c | ||
ieee80211_ageq.h | ||
ieee80211_alq.c | ||
ieee80211_alq.h | ||
ieee80211_amrr.c | ||
ieee80211_amrr.h | ||
ieee80211_crypto_ccmp.c | ||
ieee80211_crypto_none.c | ||
ieee80211_crypto_tkip.c | ||
ieee80211_crypto_wep.c | ||
ieee80211_crypto.c | ||
ieee80211_crypto.h | ||
ieee80211_ddb.c | ||
ieee80211_dfs.c | ||
ieee80211_dfs.h | ||
ieee80211_freebsd.c | ||
ieee80211_freebsd.h | ||
ieee80211_hostap.c | ||
ieee80211_hostap.h | ||
ieee80211_ht.c | ||
ieee80211_ht.h | ||
ieee80211_hwmp.c | ||
ieee80211_input.c | ||
ieee80211_input.h | ||
ieee80211_ioctl.c | ||
ieee80211_ioctl.h | ||
ieee80211_mesh.c | ||
ieee80211_mesh.h | ||
ieee80211_monitor.c | ||
ieee80211_monitor.h | ||
ieee80211_node.c | ||
ieee80211_node.h | ||
ieee80211_output.c | ||
ieee80211_phy.c | ||
ieee80211_phy.h | ||
ieee80211_power.c | ||
ieee80211_power.h | ||
ieee80211_proto.c | ||
ieee80211_proto.h | ||
ieee80211_radiotap.c | ||
ieee80211_radiotap.h | ||
ieee80211_ratectl_none.c | ||
ieee80211_ratectl.c | ||
ieee80211_ratectl.h | ||
ieee80211_regdomain.c | ||
ieee80211_regdomain.h | ||
ieee80211_rssadapt.c | ||
ieee80211_rssadapt.h | ||
ieee80211_scan_sta.c | ||
ieee80211_scan_sw.c | ||
ieee80211_scan_sw.h | ||
ieee80211_scan.c | ||
ieee80211_scan.h | ||
ieee80211_sta.c | ||
ieee80211_sta.h | ||
ieee80211_superg.c | ||
ieee80211_superg.h | ||
ieee80211_tdma.c | ||
ieee80211_tdma.h | ||
ieee80211_var.h | ||
ieee80211_wds.c | ||
ieee80211_wds.h | ||
ieee80211_xauth.c | ||
ieee80211.c | ||
ieee80211.h |