aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/agg-rx.c
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2011-07-19 06:14:42 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-07-20 15:04:36 -0400
commit0a557ed3a0a4f7e36d76da137b781344f548c464 (patch)
tree110e1842e22def99c87581ebe71bc3c32f272b9c /net/mac80211/agg-rx.c
parent5966f2ddcda452455f8ab518b7cba221b5234a94 (diff)
mac80211: check sta_info_get() return value
ieee80211_stop_rx_ba_session() was calling sta_info_get() without rcu locking, and the return value was not checked. This resulted in the following panic: [<bf05726c>] (ieee80211_stop_rx_ba_session+0x0/0x60 [mac80211]) [<bf0abd94>] (wl1271_event_handle+0x0/0xdc8 [wl12xx]) [<bf0a7308>] (wl1271_irq+0x0/0x4a0 [wl12xx]) [<c00c40a8>] (irq_thread+0x0/0x254) [<c00a7398>] (kthread+0x0/0x8c) Signed-off-by: Eliad Peller <eliad@wizery.com> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/agg-rx.c')
-rw-r--r--net/mac80211/agg-rx.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
index ebadb9ac9a7e..fd1aaf2a4a6c 100644
--- a/net/mac80211/agg-rx.c
+++ b/net/mac80211/agg-rx.c
@@ -104,14 +104,22 @@ void ieee80211_stop_rx_ba_session(struct ieee80211_vif *vif, u16 ba_rx_bitmap,
104 const u8 *addr) 104 const u8 *addr)
105{ 105{
106 struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); 106 struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
107 struct sta_info *sta = sta_info_get(sdata, addr); 107 struct sta_info *sta;
108 int i; 108 int i;
109 109
110 rcu_read_lock();
111 sta = sta_info_get(sdata, addr);
112 if (!sta) {
113 rcu_read_unlock();
114 return;
115 }
116
110 for (i = 0; i < STA_TID_NUM; i++) 117 for (i = 0; i < STA_TID_NUM; i++)
111 if (ba_rx_bitmap & BIT(i)) 118 if (ba_rx_bitmap & BIT(i))
112 set_bit(i, sta->ampdu_mlme.tid_rx_stop_requested); 119 set_bit(i, sta->ampdu_mlme.tid_rx_stop_requested);
113 120
114 ieee80211_queue_work(&sta->local->hw, &sta->ampdu_mlme.work); 121 ieee80211_queue_work(&sta->local->hw, &sta->ampdu_mlme.work);
122 rcu_read_unlock();
115} 123}
116EXPORT_SYMBOL(ieee80211_stop_rx_ba_session); 124EXPORT_SYMBOL(ieee80211_stop_rx_ba_session);
117 125