]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: fix a crash in ieee80211_beacon_get_tim on change_interface
authorFelix Fietkau <nbd@openwrt.org>
Mon, 24 Jan 2011 18:28:49 +0000 (19:28 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 25 Jan 2011 21:28:56 +0000 (16:28 -0500)
commitdf212665cd405215fd7f457e3b23c2537e0103b9
tree7c107dadb64f044c7747c41e369f9780ab611cb1
parent0fdb301a8d6a6082d10660b96c21843b97cddc6c
mac80211: fix a crash in ieee80211_beacon_get_tim on change_interface

Some drivers (e.g. ath9k) do not always disable beacons when they're
supposed to. When an interface is changed using the change_interface op,
the mode specific sdata part is in an undefined state and trying to
get a beacon at this point can produce weird crashes.

To fix this, add a check for ieee80211_sdata_running before using
anything from the sdata.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/tx.c