Skip to content

Commit

Permalink
mac80211_hwsim: fix possible race condition in usage of info->control…
Browse files Browse the repository at this point in the history
….sta & control.vif

info->control.sta and control.vif may only be dereferenced during the
drv_tx call otherwise could lead to use-after-free bugs.

Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Thomas Huehn authored and John W. Linville committed Jul 26, 2012
1 parent c297977 commit 4581d91
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,11 +739,6 @@ static void mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb)

txi = IEEE80211_SKB_CB(skb);

if (txi->control.vif)
hwsim_check_magic(txi->control.vif);
if (txi->control.sta)
hwsim_check_sta_magic(txi->control.sta);

ieee80211_tx_info_clear_status(txi);

/* frame was transmitted at most favorable rate at first attempt */
Expand Down

0 comments on commit 4581d91

Please sign in to comment.