diff options
author | Thomas Huehn <thomas@net.t-labs.tu-berlin.de> | 2012-07-13 14:52:24 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-07-17 05:42:08 -0400 |
commit | b0e40e72be42153cd6473ca1fa69058a30adb2bb (patch) | |
tree | 06ea78263fd7330630bc7db6848b1f812363862f /drivers/net/wireless/mac80211_hwsim.c | |
parent | 7f9f78ab96ebdb3533acd791efe485b25995947e (diff) |
mac80211_hwsim: fix race condition with sta/vif pointers
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>
[reword commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/mac80211_hwsim.c')
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 3f38d846b093..826ac7bec73f 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -1540,11 +1540,6 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2, | |||
1540 | /* now send back TX status */ | 1540 | /* now send back TX status */ |
1541 | txi = IEEE80211_SKB_CB(skb); | 1541 | txi = IEEE80211_SKB_CB(skb); |
1542 | 1542 | ||
1543 | if (txi->control.vif) | ||
1544 | hwsim_check_magic(txi->control.vif); | ||
1545 | if (txi->control.sta) | ||
1546 | hwsim_check_sta_magic(txi->control.sta); | ||
1547 | |||
1548 | ieee80211_tx_info_clear_status(txi); | 1543 | ieee80211_tx_info_clear_status(txi); |
1549 | 1544 | ||
1550 | for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { | 1545 | for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { |