Commit ca2455ec authored by Johannes Berg's avatar Johannes Berg Committed by Greg Kroah-Hartman

iwlwifi: add missing rcu_read_lock

commit 6db6340c upstream.

Using ieee80211_find_sta() needs to be under
RCU read lock, which iwlwifi currently misses,
so fix it.
Reported-by: default avatarMiles Lane <miles.lane@gmail.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Acked-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Tested-by: default avatarMiles Lane <miles.lane@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 40146189
......@@ -1198,6 +1198,7 @@ static void iwl_tx_status(struct iwl_priv *priv, struct sk_buff *skb)
struct ieee80211_sta *sta;
struct iwl_station_priv *sta_priv;
rcu_read_lock();
sta = ieee80211_find_sta(priv->vif, hdr->addr1);
if (sta) {
sta_priv = (void *)sta->drv_priv;
......@@ -1206,6 +1207,7 @@ static void iwl_tx_status(struct iwl_priv *priv, struct sk_buff *skb)
atomic_dec_return(&sta_priv->pending_frames) == 0)
ieee80211_sta_block_awake(priv->hw, sta, false);
}
rcu_read_unlock();
ieee80211_tx_status_irqsafe(priv->hw, skb);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment