[lkml]   [2011]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[053/272] mac80211: fix a crash in ieee80211_beacon_get_tim on change_interface
2.6.37-stable review patch.  If anyone has any objections, please let us know.


From: Felix Fietkau <>

commit eb3e554b4b3a56386ef5214dbe0e3935a350178b upstream.

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 <>
Signed-off-by: John W. Linville <>
Signed-off-by: Greg Kroah-Hartman <>

net/mac80211/tx.c | 3 +++
1 file changed, 3 insertions(+)

--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2207,6 +2207,9 @@ struct sk_buff *ieee80211_beacon_get_tim

sdata = vif_to_sdata(vif);

+ if (!ieee80211_sdata_running(sdata))
+ goto out;
if (tim_offset)
*tim_offset = 0;
if (tim_length)

 \ /
  Last update: 2011-02-16 01:25    [W:0.515 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site